summaryrefslogtreecommitdiff
path: root/extras/multipath
diff options
context:
space:
mode:
authorchristophe.varoqui@free.fr <christophe.varoqui@free.fr>2003-12-15 23:25:51 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:13:08 -0700
commit9e919aa4f0e6f1ab2e6f9871d550a4f59bb3ed0c (patch)
tree887b3dfd770f9b772868bd8edd5a51765e404ad1 /extras/multipath
parentb1c5e3339deb97f4a30053111b444489a3bc9562 (diff)
[PATCH] more extras/multipath changes
* Make the HW-specific get_unique_id switch pretty * Prepare to field-test by whitelisting all known fibre array, try to fetch WWID from the standard EVPD 0x83 off 8 for everyone ... we will learn from feedback :) Could you drop a note with the udev-009 release-notes asking for testing this WWID fetching thing ?
Diffstat (limited to 'extras/multipath')
-rw-r--r--extras/multipath/main.c42
1 files changed, 36 insertions, 6 deletions
diff --git a/extras/multipath/main.c b/extras/multipath/main.c
index 6b1c37cd95..9402888c58 100644
--- a/extras/multipath/main.c
+++ b/extras/multipath/main.c
@@ -160,8 +160,11 @@ get_serial (int fd, char * str)
*/
/* hardware vendor specifics : add support for new models below */
+
+/* this one get EVPD page 0x83 off 8 */
+/* tested ok with StorageWorks */
static int
-get_storageworks_wwid(int fd, char *str)
+get_evpd_wwid(int fd, char *str)
{
char buff[64];
@@ -176,12 +179,39 @@ get_storageworks_wwid(int fd, char *str)
static int
get_unique_id(int fd, struct path * mypath)
{
- if (strncmp(mypath->product_id, "HSV110 (C)COMPAQ", 16) == 0 ||
- strncmp(mypath->product_id, "HSG80 ", 16) == 0) {
- get_storageworks_wwid(fd, mypath->wwid);
- return 0;
- }
+ int i;
+ static struct {
+ char * vendor;
+ char * product;
+ int (*getuid) (int fd, char * wwid);
+ } wlist[] = {
+ {"COMPAQ ", "HSV110 (C)COMPAQ", &get_evpd_wwid},
+ {"COMPAQ ", "MSA1000 ", &get_evpd_wwid},
+ {"COMPAQ ", "MSA1000 VOLUME ", &get_evpd_wwid},
+ {"DEC ", "HSG80 ", &get_evpd_wwid},
+ {"HP ", "HSV100 ", &get_evpd_wwid},
+ {"HP ", "A6189A ", &get_evpd_wwid},
+ {"HP ", "OPEN- ", &get_evpd_wwid},
+ {"DDN ", "SAN DataDirector", &get_evpd_wwid},
+ {"FSC ", "CentricStor ", &get_evpd_wwid},
+ {"HITACHI ", "DF400 ", &get_evpd_wwid},
+ {"HITACHI ", "DF500 ", &get_evpd_wwid},
+ {"HITACHI ", "DF600 ", &get_evpd_wwid},
+ {"IBM ", "ProFibre 4000R ", &get_evpd_wwid},
+ {"SGI ", "TP9100 ", &get_evpd_wwid},
+ {"SGI ", "TP9300 ", &get_evpd_wwid},
+ {"SGI ", "TP9400 ", &get_evpd_wwid},
+ {"SGI ", "TP9500 ", &get_evpd_wwid},
+ {NULL, NULL, NULL},
+ };
+ for (i = 0; wlist[i].vendor; i++) {
+ if (strncmp(mypath->vendor_id, wlist[i].vendor, 8) == 0 &&
+ strncmp(mypath->product_id, wlist[i].product, 16) == 0) {
+ wlist[i].getuid(fd, mypath->wwid);
+ return 0;
+ }
+ }
return 1;
}