]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
partx: do not print null
authorDavidlohr Bueso <dave@gnu.org>
Fri, 12 Aug 2011 19:36:50 +0000 (15:36 -0400)
committerKarel Zak <kzak@redhat.com>
Mon, 15 Aug 2011 12:28:21 +0000 (14:28 +0200)
Replace the annoying null output when displaying no partitions in verbose mode.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
partx/partx.c

index b2a72ede3bb97968a648b5baaeadcca1fc2a5ec2..0b35f9f482093e916f5f6113441a3658b440d563 100644 (file)
@@ -795,7 +795,7 @@ int main(int argc, char **argv)
 
        if (verbose)
                printf(_("partition: %s, disk: %s, lower: %d, upper: %d\n"),
-                               device, wholedisk, lower, upper);
+                      device ? device : "none", wholedisk, lower, upper);
 
        if (what == ACT_ADD || what == ACT_DELETE) {
                struct stat x;