]> sourceware.org Git - dm.git/commitdiff
also suppress error if device doesn't exist with STATUS
authorAlasdair Kergon <agk@redhat.com>
Wed, 26 Oct 2005 17:50:15 +0000 (17:50 +0000)
committerAlasdair Kergon <agk@redhat.com>
Wed, 26 Oct 2005 17:50:15 +0000 (17:50 +0000)
dmsetup/dmsetup.c

index 30b6c8b7cfcc4a83ec8c15fd3c2829fb3175ac3b..2db850ac98fd33261af70a8fdd1e4bf71a5a72ab 100644 (file)
@@ -707,6 +707,7 @@ static int _status(int argc, char **argv, void *data)
        char *name = NULL;
        int matched = 0;
        int ls_only = 0;
+       struct dm_info info;
 
        if (data)
                name = names->name;
@@ -737,6 +738,9 @@ static int _status(int argc, char **argv, void *data)
        if (!dm_task_run(dmt))
                goto out;
 
+       if (!dm_task_get_info(dmt, &info) || !info.exists)
+               goto out;
+
        if (!name)
                name = (char *) dm_task_get_name(dmt);
 
This page took 0.026225 seconds and 5 git commands to generate.