X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udev%2Fudevadm-info.c;h=f20eb07e046bd462f576c45967746e21f368428c;hb=b44b7f884136e1ef4452818ed514a5d7e51567f1;hp=745b4fdb7b9aad3f94194c7df4485896ec4bcae6;hpb=50025605e0f9942da513c9dcfde289495afefd17;p=elogind.git diff --git a/udev/udevadm-info.c b/udev/udevadm-info.c index 745b4fdb7..f20eb07e0 100644 --- a/udev/udevadm-info.c +++ b/udev/udevadm-info.c @@ -87,7 +87,7 @@ static int print_device_chain(struct udev_device *device) const char *str; printf("\n" - "Udevinfo starts with the device specified by the devpath and then\n" + "Udevadm info starts with the device specified by the devpath and then\n" "walks up the chain of parent devices. It prints for every device\n" "found, all possible attributes in the udev rules key format.\n" "A rule to match, can be composed by the attributes of the device\n" @@ -153,6 +153,10 @@ static void print_record(struct udev_device *device) if (i != 0) printf("R:%u\n", i); + i = udev_device_get_watch_handle(device); + if (i >= 0) + printf("W:%u\n", i); + udev_list_entry_foreach(list_entry, udev_device_get_devlinks_list_entry(device)) { len = strlen(udev_get_dev_path(udev_device_get_udev(device))); printf("S: %s\n", &udev_list_entry_get_name(list_entry)[len+1]); @@ -198,8 +202,7 @@ static int export_devices(struct udev *udev) device = udev_device_new_from_syspath(udev, udev_list_entry_get_name(list_entry)); if (device != NULL) { - if (udev_device_get_devnode(device) != NULL) - print_record(device); + print_record(device); udev_device_unref(device); } } @@ -384,8 +387,7 @@ int udevadm_info(struct udev *udev, int argc, char *argv[]) " of parent devices\n" " --device-id-of-file= print major:minor of device containing this file\n" " --export-db export the content of the udev database\n" - " --help print this text\n" - "\n"); + " --help\n\n"); goto exit; default: goto exit;