X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=udevinfo.c;h=e9de6e5e095a9e688d0f089612d6bf655afed9b4;hp=00af081eacfc1fccde721cb711aef27e3c6011c0;hb=e4d4a557e53c3fbcf14bd1bb29686fd884905b53;hpb=82ca88904d1c9bf17f4434f54e12754c00eddcbd diff --git a/udevinfo.c b/udevinfo.c index 00af081ea..e9de6e5e0 100644 --- a/udevinfo.c +++ b/udevinfo.c @@ -146,6 +146,7 @@ static int print_device_chain(const char *path) /* open sysfs class device directory and print all attributes */ printf(" looking at class device '%s':\n", class_dev->path); + printf(" SUBSYSTEM=\"%s\"\n", class_dev->classname); if (print_all_attributes(class_dev->path) != 0) { printf("couldn't open class device directory\n"); retval = -1; @@ -167,6 +168,7 @@ static int print_device_chain(const char *path) printf(" looking at the device chain at '%s':\n", sysfs_dev->path); printf(" BUS=\"%s\"\n", sysfs_dev->bus); printf(" ID=\"%s\"\n", sysfs_dev->bus_id); + printf(" DRIVER=\"%s\"\n", sysfs_dev->driver_name); /* open sysfs device directory and print all attributes */ print_all_attributes(sysfs_dev->path); @@ -218,8 +220,8 @@ static int print_sysfs_devices(void) attr = sysfs_get_classdev_attr(class_dev, "dev"); if (attr) { sscanf(attr->value, "%u:%u", &major, &minor); - printf("MAJOR %u\n", minor); - printf("MINOR %u\n", major); + printf("MAJOR %u\n", major); + printf("MINOR %u\n", minor); } phys_dev = sysfs_get_classdev_device(class_dev); @@ -339,8 +341,7 @@ static int process_options(int argc, char *argv[]) } } memset(&udev, 0x00, sizeof(struct udevice)); - strfieldcpy(udev.devpath, pos); - retval = udev_db_get_device(&udev); + retval = udev_db_get_device_by_devpath(&udev, pos); if (retval != 0) { printf("device not found in database\n"); goto exit;