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 udev_device_set_sysattr_value(). #18

Merged
merged 1 commit into from
Apr 18, 2020
Merged

Implement udev_device_set_sysattr_value(). #18

merged 1 commit into from
Apr 18, 2020

Conversation

arrowd
Copy link
Contributor

@arrowd arrowd commented Apr 11, 2020

Closes #17

Copy link
Contributor

@adriaandegroot adriaandegroot left a comment

Choose a reason for hiding this comment

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

This is pure nit-picking, the logic is sound.

udev-device.c Outdated
LIBUDEV_EXPORT int
udev_device_set_sysattr_value(struct udev_device *ud, const char *sysattr, const char *value)
{
char const *key;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this one char const while the parameter is const char? Seems inconsistent.

The declaration might also be able to live inside the loop (L240)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was copied from udev_device_get_sysattr_value(). There are many other such inconsistenties, so I'd rather not fix this one yet.

Copy link
Member

Choose a reason for hiding this comment

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

To be honest, I'm slighly unsure of the difference between char const *ptr and const char *ptr. There might be a reason to change this all over though, but it's outside scoop for this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

According to https://stackoverflow.com/a/890560/637669 there is no difference between const char * and char const *. It's only about style.

udev-device.c Outdated Show resolved Hide resolved
@zeising zeising merged commit dabb7c2 into FreeBSDDesktop:master Apr 18, 2020
@zeising
Copy link
Member

zeising commented Apr 18, 2020

Thank you very much, and sorry for the delay getting this in.
I bump version and update the port later today.

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.

udev_device_set_sysattr_value is unimplemented
3 participants