+static int print_devlinks_cb(struct udev_device *udev_device, const char *value, void *data)
+{
+ printf("link: '%s'\n", value);
+ return 0;
+}
+
+static int print_properties_cb(struct udev_device *udev_device, const char *key, const char *value, void *data)
+{
+ printf("property: '%s=%s'\n", key, value);
+ return 0;
+}
+
+static void print_device(struct udev_device *device)
+{
+ const char *str;
+ int count;
+
+ printf("*** device: %p ***\n", device);
+ str = udev_device_get_action(device);
+ printf("action: '%s'\n", str);
+ str = udev_device_get_syspath(device);
+ printf("syspath: '%s'\n", str);
+ str = udev_device_get_devpath(device);
+ printf("devpath: '%s'\n", str);
+ str = udev_device_get_subsystem(device);
+ printf("subsystem: '%s'\n", str);
+ str = udev_device_get_driver(device);
+ printf("driver: '%s'\n", str);
+ str = udev_device_get_devname(device);
+ printf("devname: '%s'\n", str);
+ count = udev_device_get_devlinks(device, print_devlinks_cb, NULL);
+ printf("found %i links\n", count);
+ count = udev_device_get_properties(device, print_properties_cb, NULL);
+ printf("found %i properties\n", count);
+ printf("\n");
+}
+
+static int test_device(struct udev *udev, const char *syspath)