102-add-stub-udev_enumerate_add_nomatch_sysattr.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. --- a/src/libudev.c
  2. +++ b/src/libudev.c
  3. @@ -162,7 +162,7 @@ udev_device_get_driver(struct udev_devic
  4. char driverlnk[32];
  5. snprintf(driverlnp, sizeof(driverlnp), "%s/driver",
  6. udev_device->sysfspath);
  7. - if (readlink(driverlnp, driverlnk, sizeof(driver)))
  8. + if (readlink(driverlnp, driverlnk, sizeof(driverlnk)))
  9. {
  10. char *drivernm;
  11. drivernm = strrchr(driverlnk, '/');
  12. @@ -600,6 +600,18 @@ udev_enumerate_add_match_property(struct
  13. value);
  14. return -1;
  15. }
  16. +
  17. +int
  18. +udev_enumerate_add_nomatch_sysattr(struct udev_enumerate *udev_enumerate,
  19. + const char *sysattr, const char *value)
  20. +{
  21. + (void)udev_enumerate;
  22. + (void)sysattr;
  23. + (void)value;
  24. + LOG("stub: udev_enumerate_add_nomatch_sysattr %s %s\n", sysattr,
  25. + value);
  26. + return -1;
  27. +}
  28. void
  29. udev_enumerate_unref(struct udev_enumerate *udev_enumerate)
  30. --- a/src/libudev.h
  31. +++ b/src/libudev.h
  32. @@ -59,6 +59,8 @@ int udev_enumerate_add_match_sysname(
  33. struct udev_enumerate *udev_enumerate, char const *sysname);
  34. int udev_enumerate_add_match_property(struct udev_enumerate *udev_enumerate,
  35. char const *property, char const *value);
  36. +int udev_enumerate_add_nomatch_sysattr(struct udev_enumerate *udev_enumerate,
  37. + const char *sysattr, const char *value);
  38. void udev_enumerate_unref(struct udev_enumerate *udev_enumerate);
  39. #define udev_list_entry_foreach(list_entry, first_entry) \