X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=udev%2Fudevadm-info.c;h=6fe1f8631328932f6aa64ffb16bd91e1d862ef40;hp=b18f249495587498bd56095a7d5f06507c97dda7;hb=10b2d011e70ddf9361c61f6147dc88f670d28abd;hpb=ee137da3897d154e0c62b03ea7ef3c3359753adc diff --git a/udev/udevadm-info.c b/udev/udevadm-info.c index b18f24949..6fe1f8631 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); @@ -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" @@ -141,15 +141,15 @@ static void print_record(struct udev_device *device) if (str != NULL) printf("N: %s\n", &str[len+1]); - i = device_get_devlink_priority(device); + i = udev_device_get_devlink_priority(device); if (i != 0) printf("L: %i\n", i); - i = device_get_num_fake_partitions(device); + i = udev_device_get_num_fake_partitions(device); if (i != 0) printf("A:%u\n", i); - i = device_get_ignore_remove(device); + i = udev_device_get_ignore_remove(device); if (i != 0) printf("R:%u\n", i); @@ -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"