/* open sysfs class device directory and print all attributes */
printf(" looking at class device '%s':\n", class_dev->path);
/* open sysfs class device directory and print all attributes */
printf(" looking at class device '%s':\n", class_dev->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(" 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);
attr = sysfs_get_classdev_attr(class_dev, "dev");
if (attr) {
sscanf(attr->value, "%u:%u", &major, &minor);
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);
" -q TYPE query database for the specified value:\n"
" 'name' name of device node\n"
" 'symlink' pointing to node\n"
" -q TYPE query database for the specified value:\n"
" 'name' name of device node\n"
" 'symlink' pointing to node\n"