mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-30 17:18:21 +03:00
also suppress error if device doesn't exist with STATUS
This commit is contained in:
parent
9e356e11e0
commit
697e09df50
@ -707,6 +707,7 @@ static int _status(int argc, char **argv, void *data)
|
|||||||
char *name = NULL;
|
char *name = NULL;
|
||||||
int matched = 0;
|
int matched = 0;
|
||||||
int ls_only = 0;
|
int ls_only = 0;
|
||||||
|
struct dm_info info;
|
||||||
|
|
||||||
if (data)
|
if (data)
|
||||||
name = names->name;
|
name = names->name;
|
||||||
@ -737,6 +738,9 @@ static int _status(int argc, char **argv, void *data)
|
|||||||
if (!dm_task_run(dmt))
|
if (!dm_task_run(dmt))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
if (!dm_task_get_info(dmt, &info) || !info.exists)
|
||||||
|
goto out;
|
||||||
|
|
||||||
if (!name)
|
if (!name)
|
||||||
name = (char *) dm_task_get_name(dmt);
|
name = (char *) dm_task_get_name(dmt);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user