diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index b0dd01bcd..6475fbdba 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -1,5 +1,6 @@ Version 1.02.145 - =================================== + Issue a specific error with dmsetup status if device is unknown. Fix RT_LIBS reference in generated libdevmapper.pc for pkg-config Version 1.02.144 - 6th October 2017 diff --git a/tools/dmsetup.c b/tools/dmsetup.c index 661910f74..53097b38b 100644 --- a/tools/dmsetup.c +++ b/tools/dmsetup.c @@ -2431,9 +2431,14 @@ static int _status(CMD_ARGS) if (!_task_run(dmt)) goto_out; - if (!dm_task_get_info(dmt, &info) || !info.exists) + if (!dm_task_get_info(dmt, &info)) goto_out; + if (!info.exists) { + fprintf(stderr, "Device does not exist.\n"); + goto_out; + } + if (!name) name = dm_task_get_name(dmt);