[multipath] set "multipath -f|-F" return code correctly
authorChristophe Varoqui <christophe.varoqui@free.fr>
Mon, 24 Nov 2008 22:14:59 +0000 (23:14 +0100)
committerChristophe Varoqui <christophe.varoqui@free.fr>
Mon, 24 Nov 2008 22:14:59 +0000 (23:14 +0100)
Thanks to Diedrich Ehlerding <diedrich.ehlerding@fujitsu-siemens.com>
for reporting this.

multipath/main.c

index 7ae6d13..8b38a6e 100644 (file)
@@ -425,14 +425,14 @@ main (int argc, char *argv[])
 
        if (conf->remove == FLUSH_ONE) {
                if (conf->dev_type == DEV_DEVMAP)
-                       dm_flush_map(conf->dev);
+                       r = dm_flush_map(conf->dev);
                else
                        condlog(0, "must provide a map name to remove");
 
                goto out;
        }
        else if (conf->remove == FLUSH_ALL) {
-               dm_flush_maps();
+               r = dm_flush_maps();
                goto out;
        }
        while ((r = configure()) < 0)