[PATCH 08/13] libmultipath: rename DI_SERIAL to DI_IOCTL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



DI_IOCTL is a much more sensible name for what this flag controls.  All
the pathinfo functions that run for DI_SERIAL use ioctls. They don't
just get the serial info, and the serial info can also be gotten by
functions run for DI_SYSFS.

Signed-off-by: Benjamin Marzinski <bmarzins@xxxxxxxxxx>
---
 libmultipath/discovery.c | 6 +++---
 libmultipath/discovery.h | 7 +++----
 multipath/main.c         | 2 +-
 tests/test-lib.c         | 2 +-
 4 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index ea10f086..8a780d69 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -1912,7 +1912,7 @@ scsi_ioctl_pathinfo (struct path * pp, int mask)
 {
 	int vpd_id;
 
-	if (!(mask & DI_SERIAL))
+	if (!(mask & DI_IOCTL))
 		return;
 
 	select_vpd_vendor_id(pp);
@@ -2433,13 +2433,13 @@ int pathinfo(struct path *pp, struct config *conf, int mask)
 		goto blank;
 	}
 
-	if (mask & DI_SERIAL)
+	if (mask & DI_IOCTL)
 		get_geometry(pp);
 
 	if (path_state == PATH_UP && pp->bus == SYSFS_BUS_SCSI)
 		scsi_ioctl_pathinfo(pp, mask);
 
-	if (pp->bus == SYSFS_BUS_CCISS && mask & DI_SERIAL)
+	if (pp->bus == SYSFS_BUS_CCISS && mask & DI_IOCTL)
 		cciss_ioctl_pathinfo(pp);
 
 	if (mask & DI_CHECKER) {
diff --git a/libmultipath/discovery.h b/libmultipath/discovery.h
index 1f7a6e20..c4a8dd96 100644
--- a/libmultipath/discovery.h
+++ b/libmultipath/discovery.h
@@ -67,7 +67,7 @@ void cleanup_udev_device_ptr(void *arg);
  */
 enum discovery_mode {
 	DI_SYSFS__,
-	DI_SERIAL__,
+	DI_IOCTL__,
 	DI_CHECKER__,
 	DI_PRIO__,
 	DI_WWID__,
@@ -77,7 +77,7 @@ enum discovery_mode {
 };
 
 #define DI_SYSFS	(1 << DI_SYSFS__)
-#define DI_SERIAL	(1 << DI_SERIAL__)
+#define DI_IOCTL	(1 << DI_IOCTL__)
 #define DI_CHECKER	(1 << DI_CHECKER__)
 #define DI_PRIO		(1 << DI_PRIO__)
 #define DI_WWID		(1 << DI_WWID__)
@@ -85,7 +85,6 @@ enum discovery_mode {
 #define DI_NOIO		(1 << DI_NOIO__) /* Avoid IO on the device */
 #define DI_NOFALLBACK	(1 << DI_NOFALLBACK__) /* do not allow wwid fallback */
 
-#define DI_ALL		(DI_SYSFS  | DI_SERIAL | DI_CHECKER | DI_PRIO | \
-			 DI_WWID)
+#define DI_ALL		(DI_SYSFS  | DI_IOCTL | DI_CHECKER | DI_PRIO | DI_WWID)
 
 #endif /* DISCOVERY_H_INCLUDED */
diff --git a/multipath/main.c b/multipath/main.c
index 54d635da..46399350 100644
--- a/multipath/main.c
+++ b/multipath/main.c
@@ -533,7 +533,7 @@ configure (struct config *conf, enum mpath_cmds cmd,
 
 	if (cmd == CMD_LIST_LONG)
 		/* extended path info '-ll' */
-		di_flag |= DI_SYSFS | DI_CHECKER | DI_SERIAL;
+		di_flag |= DI_SYSFS | DI_CHECKER | DI_IOCTL;
 	else if (cmd == CMD_LIST_SHORT)
 		/* minimum path info '-l' */
 		di_flag |= DI_SYSFS;
diff --git a/tests/test-lib.c b/tests/test-lib.c
index cb60f10e..e529711d 100644
--- a/tests/test-lib.c
+++ b/tests/test-lib.c
@@ -18,7 +18,7 @@
 #include "test-lib.h"
 #include "wrap64.h"
 
-const int default_mask = (DI_SYSFS|DI_BLACKLIST|DI_WWID|DI_CHECKER|DI_PRIO|DI_SERIAL);
+const int default_mask = (DI_SYSFS|DI_BLACKLIST|DI_WWID|DI_CHECKER|DI_PRIO|DI_IOCTL);
 const char default_devnode[] = "sdxTEST";
 const char default_wwid[] = "TEST-WWID";
 /* default_wwid should be a substring of default_wwid_1! */
-- 
2.46.2





[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux