mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
dmsetup: Add unknown device error to dmsetup status.
Treat status the same way as info if provided device name doesn't exist.
This commit is contained in:
parent
fdcc709ed0
commit
4b0f6829f6
@ -1,5 +1,6 @@
|
|||||||
Version 1.02.145 -
|
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
|
Fix RT_LIBS reference in generated libdevmapper.pc for pkg-config
|
||||||
|
|
||||||
Version 1.02.144 - 6th October 2017
|
Version 1.02.144 - 6th October 2017
|
||||||
|
@ -2431,9 +2431,14 @@ static int _status(CMD_ARGS)
|
|||||||
if (!_task_run(dmt))
|
if (!_task_run(dmt))
|
||||||
goto_out;
|
goto_out;
|
||||||
|
|
||||||
if (!dm_task_get_info(dmt, &info) || !info.exists)
|
if (!dm_task_get_info(dmt, &info))
|
||||||
goto_out;
|
goto_out;
|
||||||
|
|
||||||
|
if (!info.exists) {
|
||||||
|
fprintf(stderr, "Device does not exist.\n");
|
||||||
|
goto_out;
|
||||||
|
}
|
||||||
|
|
||||||
if (!name)
|
if (!name)
|
||||||
name = dm_task_get_name(dmt);
|
name = dm_task_get_name(dmt);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user