Lines Matching defs:devpath
42 { "devpath", 1, NULL, 's' },
172 static int create_tmp_dev(const char *devpath, char *tmpdev, int dev_type)
177 dbg("%s", devpath);
178 attr = sysfs_attr_get_value(devpath, "dev");
180 dbg("%s: could not get dev attribute: %s", devpath, strerror(errno));
186 err("%s: invalid dev major/minor", devpath);
468 " --devpath sysfs devpath\n"
597 vendor = sysfs_attr_get_value(dev_scsi->devpath, "vendor");
599 info("%s: cannot get vendor attribute", dev_scsi->devpath);
604 model = sysfs_attr_get_value(dev_scsi->devpath, "model");
606 info("%s: cannot get model attribute\n", dev_scsi->devpath);
611 type = sysfs_attr_get_value(dev_scsi->devpath, "type");
613 info("%s: cannot get type attribute", dev_scsi->devpath);
618 type = sysfs_attr_get_value(dev_scsi->devpath, "rev");
620 info("%s: cannot get type attribute\n", dev_scsi->devpath);
677 static int scsi_id(const char *devpath, char *maj_min_dev)
689 dbg("devpath %s\n", devpath);
691 dev = sysfs_device_get(devpath);
693 err("unable to access '%s'", devpath);
703 if (!dev_specified && create_tmp_dev(dev->devpath, maj_min_dev, dev_type)) {
712 err("unable to access parent device of '%s'", devpath);
768 char devpath[MAX_PATH_LEN];
790 strncpy(devpath, env, MAX_PATH_LEN);
791 devpath[sizeof(devpath)-1] = '\0';
804 if (set_options(newargc, newargv, short_options, devpath,
816 if (set_options(argc, argv, short_options, devpath, maj_min_dev) < 0)
820 info("--devpath=<path> must be specified\n");
825 retval = scsi_id(devpath, maj_min_dev);