@@ -465,7 +465,7 @@
return 0;
if (dm_type(mapname, type) <= 0)
- return 1;
+ return 0;
if (dm_remove_partmaps(mapname))
return 1;
@@ -507,7 +507,7 @@
goto out;
do {
- r += dm_flush_map(names->name, type);
+ r |= dm_flush_map(names->name, type);
next = names->next;
names = (void *) names + next;
} while (next);
@@ -1,7 +1,7 @@
/*
* Soft: multipath device mapper target autoconfig
*
- * Version: $Id: main.c,v 1.44.2.6 2008/08/22 21:55:43 bmarzins Exp $
+ * Version: $Id: main.c,v 1.44.2.7 2009/05/04 18:12:07 bmarzins Exp $
*
* Author: Christophe Varoqui
*
@@ -404,14 +404,14 @@
if (conf->remove == FLUSH_ONE) {
if (conf->dev_type == DEV_DEVMAP)
- dm_flush_map(conf->dev, DEFAULT_TARGET);
+ r = dm_flush_map(conf->dev, DEFAULT_TARGET);
else
condlog(0, "must provide a map name to remove");
goto out;
}
else if (conf->remove == FLUSH_ALL) {
- dm_flush_maps(DEFAULT_TARGET);
+ r = dm_flush_maps(DEFAULT_TARGET);
goto out;
}
while ((r = configure()) < 0)