X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=udev%2Fudevadm-info.c;h=745b4fdb7b9aad3f94194c7df4485896ec4bcae6;hp=78c218eef0b22355d2d08a74c4d76a309b1f3a8a;hb=50025605e0f9942da513c9dcfde289495afefd17;hpb=aa8734ffcb8a895fc8d66ff383cbcf8f4b78f562 diff --git a/udev/udevadm-info.c b/udev/udevadm-info.c index 78c218eef..745b4fdb7 100644 --- a/udev/udevadm-info.c +++ b/udev/udevadm-info.c @@ -60,7 +60,7 @@ static void print_all_attributes(struct udev_device *device, const char *key) if (S_ISLNK(statbuf.st_mode)) continue; - value = udev_device_get_attr_value(device, dent->d_name); + value = udev_device_get_sysattr_value(device, dent->d_name); if (value == NULL) continue; dbg(udev, "attr '%s'='%s'(%zi)\n", dent->d_name, value, len); @@ -228,7 +228,7 @@ int udevadm_info(struct udev *udev, int argc, char *argv[]) { "device-id-of-file", required_argument, NULL, 'd' }, { "export", no_argument, NULL, 'x' }, { "export-prefix", required_argument, NULL, 'P' }, - { "version", no_argument, NULL, 1 }, /* -V outputs braindead format */ + { "version", no_argument, NULL, 'V' }, { "help", no_argument, NULL, 'h' }, {} }; @@ -366,11 +366,8 @@ int udevadm_info(struct udev *udev, int argc, char *argv[]) case 'P': export_prefix = optarg; break; - case 1: - printf("%s\n", VERSION); - goto exit; case 'V': - printf("udevinfo, version %s\n", VERSION); + printf("%s\n", VERSION); goto exit; case 'h': printf("Usage: udevadm info OPTIONS\n"