Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syscall.lfs improvement #216

Open
tst2005 opened this issue Nov 16, 2017 · 4 comments
Open

syscall.lfs improvement #216

tst2005 opened this issue Nov 16, 2017 · 4 comments

Comments

@tst2005
Copy link

tst2005 commented Nov 16, 2017

Hello

I compared the syscall.lfs to lua file-system (lfs). Even there are not far to be equivalent
I found some differences. Some of them should be emulated or fixed.

I found one I'm not able to fix : about the device information returned by lfs.attributes.

I need it to make a find like that are able to stay on the same file system.

print( require"syscall.lfs".attributes(".","dev") )

I got a cdata (cdata<struct 1222>: 0x40e43248).

  • How to deal with it ?
  • How can I get a numerical value something to identify the device ?

Any help is welcome!

Regards

@justincormack
Copy link
Owner

Oh, currently dev returns a type that has major, minor and dev, so print(lfs.attributes(".", "dev").dev) will work. Thats not correct for compatibility...

@tst2005
Copy link
Author

tst2005 commented Nov 24, 2017

Oh thanks!
Now I will be able to make some compat stuff...

@justincormack
Copy link
Owner

I think this should be fixed to be compatible..

@tst2005 tst2005 changed the title need help to improve syscall.lfs support syscall.lfs improvement Aug 28, 2018
@tst2005
Copy link
Author

tst2005 commented Aug 28, 2018

Hello,
I made my possible to follow the luafilesystem behavior/API :

  1. about lfs.attributes and lfs.symlinkattributes : see syscall.lfs improvement : device info #227 to have a number value in dev and rdev field and also support the table argument.
  2. fix the case when lfs.dir raise an error : see syscall.lfs improvement : fix error behavior #228

Note: the 2nd PR is made on the base of the first one, I don't know if it the best way to do...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants