mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-30 14:55:26 +03:00
udev: path_id - set supported_parent for well-known SCSI setups
This commit is contained in:
parent
f6d1de8547
commit
cc821d02a3
@ -332,7 +332,7 @@ static struct udev_device *handle_scsi_hyperv(struct udev_device *parent, char *
|
|||||||
return parent;
|
return parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct udev_device *handle_scsi(struct udev_device *parent, char **path) {
|
static struct udev_device *handle_scsi(struct udev_device *parent, char **path, bool *supported_parent) {
|
||||||
const char *devtype;
|
const char *devtype;
|
||||||
const char *name;
|
const char *name;
|
||||||
const char *id;
|
const char *id;
|
||||||
@ -346,6 +346,7 @@ static struct udev_device *handle_scsi(struct udev_device *parent, char **path)
|
|||||||
if (id != NULL) {
|
if (id != NULL) {
|
||||||
parent = skip_subsystem(parent, "scsi");
|
parent = skip_subsystem(parent, "scsi");
|
||||||
path_prepend(path, "ieee1394-0x%s", id);
|
path_prepend(path, "ieee1394-0x%s", id);
|
||||||
|
*supported_parent = true;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -354,16 +355,19 @@ static struct udev_device *handle_scsi(struct udev_device *parent, char **path)
|
|||||||
|
|
||||||
if (strstr(name, "/rport-") != NULL) {
|
if (strstr(name, "/rport-") != NULL) {
|
||||||
parent = handle_scsi_fibre_channel(parent, path);
|
parent = handle_scsi_fibre_channel(parent, path);
|
||||||
|
*supported_parent = true;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strstr(name, "/end_device-") != NULL) {
|
if (strstr(name, "/end_device-") != NULL) {
|
||||||
parent = handle_scsi_sas(parent, path);
|
parent = handle_scsi_sas(parent, path);
|
||||||
|
*supported_parent = true;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strstr(name, "/session") != NULL) {
|
if (strstr(name, "/session") != NULL) {
|
||||||
parent = handle_scsi_iscsi(parent, path);
|
parent = handle_scsi_iscsi(parent, path);
|
||||||
|
*supported_parent = true;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -502,7 +506,7 @@ static int builtin_path_id(struct udev_device *dev, int argc, char *argv[], bool
|
|||||||
} else if (streq(subsys, "scsi_tape")) {
|
} else if (streq(subsys, "scsi_tape")) {
|
||||||
handle_scsi_tape(parent, &path);
|
handle_scsi_tape(parent, &path);
|
||||||
} else if (streq(subsys, "scsi")) {
|
} else if (streq(subsys, "scsi")) {
|
||||||
parent = handle_scsi(parent, &path);
|
parent = handle_scsi(parent, &path, &supported_parent);
|
||||||
supported_transport = true;
|
supported_transport = true;
|
||||||
} else if (streq(subsys, "cciss")) {
|
} else if (streq(subsys, "cciss")) {
|
||||||
parent = handle_cciss(parent, &path);
|
parent = handle_cciss(parent, &path);
|
||||||
|
Loading…
Reference in New Issue
Block a user