Skip to contentSkip to conversation

multipath-tools ./Makefile libcheckers/Makefil ...

PATCH [email protected] 1 participant 1 message Jun 18, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/dm
Module name: multipath-tools
Branch: RHEL5_FC6
Changes by: [email protected] 2007-06-18 17:37:18

Modified files:

	.              : Makefile 
	libcheckers    : Makefile checkers.c checkers.h 
	libmultipath   : blacklist.c discovery.c discovery.h structs.h 

util.c util.h
multipath : main.c
Added files:
cciss_id : Makefile cciss_id.c cciss_ioctl.h
libcheckers : cciss_tur.c cciss_tur.h

Log message:
Feature for bz #223146. Added cciss device components.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/Makefile.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.7&r2=1.7.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/cciss_id/Makefile.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/cciss_id/cciss_id.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/cciss_id/cciss_ioctl.h.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libcheckers/cciss_tur.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libcheckers/cciss_tur.h.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=NONE&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libcheckers/Makefile.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.5.2.1&r2=1.5.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libcheckers/checkers.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.1.2.1&r2=1.1.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libcheckers/checkers.h.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.5.2.1&r2=1.5.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/blacklist.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.11.2.1&r2=1.11.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/discovery.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.32.2.4&r2=1.32.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/discovery.h.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.14&r2=1.14.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/structs.h.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.18&r2=1.18.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/util.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.5&r2=1.5.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/util.h.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.4&r2=1.4.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipath/main.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.44.2.2&r2=1.44.2.3

Makefile +2 -2
@@ -19,11 +19,11 @@
 endif
 export KRNLSRC
 export KRNLOBJ
-BUILDDIRS = multipath multipathd kpartx path_priority/pp_alua \
+BUILDDIRS = multipath multipathd kpartx cciss_id path_priority/pp_alua \
 	    path_priority/pp_emc path_priority/pp_hds_modular \
 	    path_priority/pp_netapp path_priority/pp_tpc
 
-ALLDIRS = multipath multipathd kpartx path_priority/pp_alua \
+ALLDIRS = multipath multipathd kpartx cciss_id path_priority/pp_alua \
 	  path_priority/pp_emc path_priority/pp_hds_modular \
 	  path_priority/pp_netapp path_priority/pp_tpc \
 	  libmultipath libcheckers
libcheckers/Makefile +1 -1
@@ -6,7 +6,7 @@
 
 include ../Makefile.inc
 
-OBJS = checkers.o readsector0.o tur.o directio.o emc_clariion.o hp_sw.o rdac.o
+OBJS = checkers.o readsector0.o tur.o directio.o emc_clariion.o hp_sw.o rdac.o cciss_tur.o
 
 all: $(BUILD)
 
libcheckers/checkers.c +10 -0
@@ -9,6 +9,7 @@
 #include "emc_clariion.h"
 #include "rdac.h"
 #include "readsector0.h"
+#include "cciss_tur.h"
 
 static struct checker checkers[] = {
 	{
@@ -65,6 +66,15 @@
 		.init       = readsector0_init,
 		.free       = readsector0_free
 	},
+	{
+		.fd         = 0,
+		.name       = CCISS_TUR,
+		.message    = "",
+		.context    = NULL,
+		.check      = cciss_tur,
+		.init       = cciss_tur_init,
+		.free       = cciss_tur_free
+	},
 	{0, "", "", NULL, NULL, NULL, NULL},
 };
 
libcheckers/checkers.h +1 -0
@@ -17,6 +17,7 @@
 #define RDAC         "rdac"
 #define EMC_CLARIION "emc_clariion"
 #define READSECTOR0  "readsector0"
+#define CCISS_TUR    "cciss_tur"
 
 #define DEFAULT_CHECKER READSECTOR0
 
libmultipath/blacklist.c +3 -3
@@ -114,13 +114,13 @@
 		return 1;
 	if (store_ble(conf->blist_devnode, str, ORIGIN_DEFAULT))
 		return 1;
-	
-	str = STRDUP("^cciss!c[0-9]d[0-9]*");
+/*	
+	str = STRDUP("^cciss!c[0-9]d[0-9]*");     
 	if (!str)
 		return 1;
 	if (store_ble(conf->blist_devnode, str, ORIGIN_DEFAULT))
 		return 1;
-
+*/
 	vector_foreach_slot (conf->hwtable, hwe, i) {
 		if (hwe->bl_product) {
 			if (alloc_ble_device(conf->blist_device))
libmultipath/discovery.c +51 -0

99 lines not on this page · raw message

libmultipath/discovery.h +1 -0
@@ -29,6 +29,7 @@
 int sysfs_get_model (char * sysfs_path, char * dev, char * buff, int len);
 int sysfs_get_rev (char * sysfs_path, char * dev, char * buff, int len);
 int sysfs_get_dev (char * sysfs_path, char * dev, char * buff, int len);
+int sysfs_get_bustype (char * sysfs_path, char * dev, char * buff, int len);
 
 int sysfs_get_size (char * sysfs_path, char * dev, unsigned long long *);
 int path_discovery (vector pathvec, struct config * conf, int flag);
libmultipath/structs.h +1 -0
@@ -40,6 +40,7 @@
 	SYSFS_BUS_SCSI,
 	SYSFS_BUS_IDE,
 	SYSFS_BUS_CCW,
+	SYSFS_BUS_CCISS
 };
 
 enum pathstates {
libmultipath/util.c +12 -0
@@ -52,6 +52,18 @@
 	strcpy(str2, p);
 }
 
+void 
+cciss_basename (char * str1, char * str2)
+{
+	char *p = str1 + (strlen(str1) );
+
+        while (*--p != '!' && p != str1)
+                continue;
+        if (p != str1)
+                p++;
+        strcpy(str2, p);
+}
+
 int
 filepresent (char * run) {
 	struct stat buf;
libmultipath/util.h +1 -1
@@ -6,7 +6,7 @@
 void basename (char * src, char * dst);
 int filepresent (char * run);
 int get_word (char * sentence, char ** word);
-
+void cciss_basename (char * , char * );
 
 #define safe_sprintf(var, format, args...)	\
 	snprintf(var, sizeof(var), format, ##args) >= sizeof(var)
multipath/main.c +2 -3
@@ -1,7 +1,7 @@
 /*
  * Soft:        multipath device mapper target autoconfig
  *
- * Version:     $Id: main.c,v 1.44.2.2 2007/06/15 19:03:02 bmarzins Exp $
+ * Version:     $Id: main.c,v 1.44.2.3 2007/06/18 17:37:18 bmarzins Exp $
  *
  * Author:      Christophe Varoqui
  *
@@ -268,8 +268,7 @@
 		/* maximum info */
 		di_flag = DI_ALL;
 
-	if (path_discovery(pathvec, conf, di_flag))
-		goto out;
+	path_discovery(pathvec, conf, di_flag);
 
 	if (conf->verbosity > 2)
 		print_all_paths(pathvec, 1);