开发者

Safer Alternative to System Call Hijacking?

I asked a more general question in my previous post, but I'm re-posting to make the question more specific.

Does anybody know another way to redirect hard-drive I/O? I need to be able to direct a read/write operation on disk to another path without disrupting the system calls.

There HAS to be another way.

I think one way to do it is to copy/move the targeted file to another path AFTER the write. However, I still need to redirect read ac开发者_开发技巧cess to that file. Is there any way to perhaps mount a file over another file, so the physical head of the hard-drive accesses the moved/copied file instead?

Thanks for any feedback.


The simplest way to do what you want is probably to implement a filesystem that overlays another filesystem.

Your filesystem will be the first port of call for all read and write calls for files within it, and it can redirect them as it sees fit. This would work in a similar way to overlay / union filesystems (although it should be simpler, because you don't need to try to deal with more than one underlying filesystem).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜