From 697e09df50be9f241433cdb42f301d7fd06eb61d Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Wed, 26 Oct 2005 17:50:15 +0000 Subject: [PATCH] also suppress error if device doesn't exist with STATUS --- tools/dmsetup.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/dmsetup.c b/tools/dmsetup.c index 30b6c8b7c..2db850ac9 100644 --- a/tools/dmsetup.c +++ b/tools/dmsetup.c @@ -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); -- 2.43.5