|
发表于 2006-1-11 13:54:40
|
显示全部楼层
那就自己动手,丰衣足食
自己调用 file_open 获取 file 结构,然后:
- loff_t pos = file_pos_read(file);
- ret = vfs_write(file, buf, count, &pos);
- file_pos_write(file, pos);
- fput_light(file, fput_needed);
复制代码
不过这样很危险,因为很有可能睡眠。可以考虑交给工作队列(workqueue)或者自己创建内核线程 |
|