projects
/
platform
/
upstream
/
multipath-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b49226
)
[libmultipath] fix empty map flushing
author
Christophe Varoqui
<root@xa-s05.(none)>
Fri, 14 Oct 2005 15:17:02 +0000
(17:17 +0200)
committer
Christophe Varoqui
<root@xa-s05.(none)>
Fri, 14 Oct 2005 15:17:02 +0000
(17:17 +0200)
devmapper.c:dm_flush_map() should flush empty map, whatever the type the
caller asked it to limit to.
Noted by Maxim Kozover
libmultipath/devmapper.c
patch
|
blob
|
history
diff --git
a/libmultipath/devmapper.c
b/libmultipath/devmapper.c
index
ca2d25d
..
20ecabb
100644
(file)
--- a/
libmultipath/devmapper.c
+++ b/
libmultipath/devmapper.c
@@
-253,6
+253,12
@@
out:
return r;
}
+/*
+ * returns:
+ * 1 : match
+ * 0 : no match
+ * -1 : empty map
+ */
extern int
dm_type(char * name, char * type)
{
@@
-375,7
+381,7
@@
dm_flush_map (char * mapname, char * type)
if (!dm_map_present(mapname))
return 0;
- if (
type && dm_type(mapname, type) <= 0
)
+ if (
!dm_type(mapname, type)
)
return 1;
if (dm_remove_partmaps(mapname))