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

Implement binding for extended file attributes handling on Linux. #1018

Closed
wants to merge 2 commits into from

Conversation

wilx
Copy link
Contributor

@wilx wilx commented Oct 1, 2018

No description provided.

Copy link
Member

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your work. I did a first pass over the code and left comments inline.

You choose to base your work on 4.5.X. I left that branch as a pure bugfix branch. Feature work should go into master. I already checked - your changes apply cleanly onto master.

int lsetxattr(String path, String name, Pointer value, size_t size, int flags);
int fsetxattr(int fd, String name, Pointer value, size_t size, int flags);

ssize_t getxattr(String path, String name, Pointer value, size_t size);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In XAttrUtil you convert Memory <-> byte[]. You could add overloads here, that take byte[] in addition to pointer - I can see use-cases for both calls:

ssize_t getxattr(String path, String name, Pointer value, size_t size);
ssize_t getxattr(String path, String name, byte[] value, size_t size);

Copy link
Contributor Author

@wilx wilx Oct 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see why it would be convenient to have such overload. But I do not understand if JNA will then apply the right conversion to handle the byte[] automatically. Does it?

@matthiasblaesing
Copy link
Member

Closing in favor of #1021

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

Successfully merging this pull request may close these issues.

2 participants