Skip to contentSkip to conversation

partx: do not print null

PATCH Applied Davidlohr Bueso 2 participants 2 messages Aug 12, 2011 – Aug 15, 2011 Util-Linux package

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 partx: do not print null

From: Davidlohr Bueso <[email protected]>
Date: Fri, 12 Aug 2011 15:36:50 -0400

Replace the annoying null output when displaying no partitions in verbose mode.

---
 partx/partx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
partx/partx.c +1 -1
index b2a72ed..0b35f9f 100644
@@ -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;
Signature · 1 line
1.7.4.1
maintainer Applied
#1 lore raw
Quoted 2 lines · Davidlohr Bueso
 partx/partx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com