diff options
author | Hannes Reinecke <hare@suse.de> | 2011-03-15 11:32:34 +0100 |
---|---|---|
committer | Hannes Reinecke <hare@suse.de> | 2011-05-13 18:24:57 +0200 |
commit | 3ebb4ea46da6ffcefd296081034b045c9de21caf (patch) | |
tree | 63b118134324b252f7762c2dc7e0b9005dda2d72 | |
parent | ed06c6122dba3a42cd6be3ab43e37840644d559d (diff) | |
download | multipath-tools-3ebb4ea46da6ffcefd296081034b045c9de21caf.tar.gz |
Use enum free_path_mode for free_paths argument
The 'free_paths' argument is really an enum, so we can as well
mark it as such.
Signed-off-by: Hannes Reinecke <hare@suse.de>
-rw-r--r-- | libmultipath/structs.c | 14 | ||||
-rw-r--r-- | libmultipath/structs.h | 14 |
2 files changed, 14 insertions, 14 deletions
diff --git a/libmultipath/structs.c b/libmultipath/structs.c index 78e1727..d482b4c 100644 --- a/libmultipath/structs.c +++ b/libmultipath/structs.c @@ -52,7 +52,7 @@ free_path (struct path * pp) } void -free_pathvec (vector vec, int free_paths) +free_pathvec (vector vec, enum free_path_mode free_paths) { int i; struct path * pp; @@ -60,7 +60,7 @@ free_pathvec (vector vec, int free_paths) if (!vec) return; - if (free_paths) + if (free_paths == FREE_PATHS) vector_foreach_slot(vec, pp, i) free_path(pp); @@ -88,7 +88,7 @@ alloc_pathgroup (void) } void -free_pathgroup (struct pathgroup * pgp, int free_paths) +free_pathgroup (struct pathgroup * pgp, enum free_path_mode free_paths) { if (!pgp) return; @@ -98,7 +98,7 @@ free_pathgroup (struct pathgroup * pgp, int free_paths) } void -free_pgvec (vector pgvec, int free_paths) +free_pgvec (vector pgvec, enum free_path_mode free_paths) { int i; struct pathgroup * pgp; @@ -155,7 +155,7 @@ free_multipath_attributes (struct multipath * mpp) } void -free_multipath (struct multipath * mpp, int free_paths) +free_multipath (struct multipath * mpp, enum free_path_mode free_paths) { if (!mpp) return; @@ -185,7 +185,7 @@ free_multipath (struct multipath * mpp, int free_paths) } void -drop_multipath (vector mpvec, char * wwid, int free_paths) +drop_multipath (vector mpvec, char * wwid, enum free_path_mode free_paths) { int i; struct multipath * mpp; @@ -203,7 +203,7 @@ drop_multipath (vector mpvec, char * wwid, int free_paths) } void -free_multipathvec (vector mpvec, int free_paths) +free_multipathvec (vector mpvec, enum free_path_mode free_paths) { int i; struct multipath * mpp; diff --git a/libmultipath/structs.h b/libmultipath/structs.h index cbbf8a6..070f2fe 100644 --- a/libmultipath/structs.h +++ b/libmultipath/structs.h @@ -25,7 +25,7 @@ #define NO_PATH_RETRY_QUEUE -2 -enum free_path_switch { +enum free_path_mode { KEEP_PATHS, FREE_PATHS }; @@ -229,13 +229,13 @@ struct path * alloc_path (void); struct pathgroup * alloc_pathgroup (void); struct multipath * alloc_multipath (void); void free_path (struct path *); -void free_pathvec (vector vec, int free_paths); -void free_pathgroup (struct pathgroup * pgp, int free_paths); -void free_pgvec (vector pgvec, int free_paths); -void free_multipath (struct multipath *, int free_paths); +void free_pathvec (vector vec, enum free_path_mode free_paths); +void free_pathgroup (struct pathgroup * pgp, enum free_path_mode free_paths); +void free_pgvec (vector pgvec, enum free_path_mode free_paths); +void free_multipath (struct multipath *, enum free_path_mode free_paths); void free_multipath_attributes (struct multipath *); -void drop_multipath (vector mpvec, char * wwid, int free_paths); -void free_multipathvec (vector mpvec, int free_paths); +void drop_multipath (vector mpvec, char * wwid, enum free_path_mode free_paths); +void free_multipathvec (vector mpvec, enum free_path_mode free_paths); int store_path (vector pathvec, struct path * pp); int store_pathgroup (vector pgvec, struct pathgroup * pgp); |