scsi_id: Export target port group
PATCH 1/1 scsi_id: Export target port group
For ALUA support it's useful to have the target port group number of a device. Export it.
Signed-off-by Hannes Reinecke <[email protected]>
extras/scsi_id/scsi.h +5 -0
@@ -54,6 +54,11 @@ struct scsi_ioctl_command {#define SCSI_ID_T10_VENDOR 1#define SCSI_ID_EUI_64 2#define SCSI_ID_NAA 3 +#define SCSI_ID_RELPORT 4 +#define SCSI_ID_TGTGROUP 5 +#define SCSI_ID_LUNGROUP 6 +#define SCSI_ID_MD5 7 +#define SCSI_ID_NAME 8/* * Supported NAA values. These fit in 4 bits, so the "don't care" value
extras/scsi_id/scsi_id.c +3 -0
@@ -575,6 +575,9 @@ static int scsi_id(struct udev *udev, char *maj_min_dev)printf ("ID_WWN_WITH_EXTENSION=0x%s\n" , dev_scsi.wwn); } } +if (dev_scsi.tgpt_group[0 ] !='\0' ) { +printf ("ID_TARGET_PORT=%s\n" , dev_scsi.tgpt_group); + }if (dev_scsi.unit_serial_number[0 ] !='\0' ) {printf ("ID_SCSI_SERIAL=%s\n" , dev_scsi.unit_serial_number); }
extras/scsi_id/scsi_id.h +3 -0
@@ -53,6 +53,9 @@ struct scsi_id_device {/* NULs if not set - otherwise hex encoding using lower-case e.g. '0xe00000d80000' */ char wwn_vendor_extension[17 ]; + +/* NULs if not set - otherwise decimal number */ +char tgpt_group[8 ]; };extern int scsi_std_inquiry (struct udev *udev,struct scsi_id_device *dev_scsi,const char *devname);
extras/scsi_id/scsi_serial.c +29 -15
112 lines not on this page · raw message
Kay Sievers
AppliedQuoted 3 lines · Hannes Reinecke
For ALUA support it's useful to have the target port group number of a device. Export it.
Applied.
Thanks,
Kay