justincormack / ljsyscall

LuaJIT Unix syscall FFI
http://www.myriabit.com/ljsyscall/
Other
441 stars 54 forks source link

SEEK_DATA and SEEK_HOLE support for linux #207

Closed tst2005 closed 7 years ago

tst2005 commented 7 years ago

Hello,

I'm interested to be able to play (on linux) with sparse file by reading file content with SEEK_HOLE.

Since linux kernel 3.1, SEEK_DATA and SEEK_HOLE has been added.

The ljsyscall's seems already support c.SEEK.DATA and c.SEEK.HOLE for freebsd.

how hard is it to also support c.SEEK.DATE and c.SEEK.HOLE for linux ?

Regards,

justincormack commented 7 years ago

Hi, added a PR for the constants, #208 that should be all thats needed.

justincormack commented 7 years ago

Let me know if thats working for you.

tst2005 commented 7 years ago

Thanks for your quick fix. I will test it.