vasi / squashfuse

FUSE filesystem to mount squashfs archives
Other
291 stars 66 forks source link

support mount option -o offset=num #7

Closed yetist closed 8 years ago

yetist commented 9 years ago

change libsquashfuse to support file offset, demo programs just modified for test. if we append a squashfs file end of a file, this is useful.

ksperling commented 8 years ago

I've implemented the same idea in a slightly different way by applying the offset to all calls to sqfs_pread() directly, rather than adjust any of the other offsets read from the sqfs data structures: https://github.com/ksperling/squashfuse/commit/d2db9fe3f9018b573f0189ebde3b731f43dd984f

An even cleaner way would probably be to have sqfs_pread() take the sqfs pointer instead of the fd; that way the offset logic could be applied in a single place.

chipturner commented 8 years ago

I've merged in offset support that I've been using a fair bit in recent months; conceptually the same as the other patches that we all apparently invented more or less separately. Please give it a try; to the best of my understanding, it is equivalent to other versions, and has a lot of miles on it in our production environment, so I think it's fine, but please try it out and see if you find any issues.