]> sourceware.org Git - lvm2.git/commitdiff
dmsetup: report error on stderr
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 1 Nov 2013 11:40:27 +0000 (12:40 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 1 Nov 2013 12:05:03 +0000 (13:05 +0100)
Send error message on stdout, since after _display_info_long()
command return errors.

Patch makes consistent behavior for command:

dmsetup info -c non-existing-dev
&
dmsetup info non-existing-dev

Now both commands report error on stderr when they return error status
for non-existing device.

WHATS_NEW_DM
tools/dmsetup.c

index 6742ad4ffd9c4c7fec48334940efaf50b2bd1faf..0f905fd68b1b781b78cb6b3eaefc9b8d73621c36 100644 (file)
@@ -1,5 +1,6 @@
 Version 1.02.83
 ==================================
+  Consistently report on stderr when device is not found for dmsetup info.
   Skip race errors when non-udev dmsetup build runs on udev-enabled system.
   Skip error message when holders are not present in sysfs.
   Use __linux__ instead of linux define to make libdevmapper.h C compliant.
index a0ee23ee5d93f139d0ee1be5cf9407502c8fcfcb..e25d109a1c4ca1c4ca4c5cb746eab6afcf2cfa0c 100644 (file)
@@ -461,7 +461,7 @@ static void _display_info_long(struct dm_task *dmt, struct dm_info *info)
        uint32_t read_ahead;
 
        if (!info->exists) {
-               printf("Device does not exist.\n");
+               fprintf(stderr, "Device does not exist.\n");
                return;
        }
 
This page took 0.048308 seconds and 5 git commands to generate.