From e32cd0d4c75b79dfb4e8ae08e8d271cb53d9d50c Mon Sep 17 00:00:00 2001 From: Christophe Varoqui Date: Mon, 3 Oct 2005 15:05:02 +0200 Subject: [PATCH] [libmultipath] print a '-' as a placeholder for devname we can't resolve iet_lun0 (149455400000000000000000000000000d00600000b000000) [size=67 GB][features="0"][hwhandler="0"] \_ round-robin 0 [enabled] \_ 15:0:0:1 sdb 8:16 [active] \_ 16:0:0:1 sdd 8:48 [active] \_ 17:0:0:1 sdh 8:112 [active] \_ #:#:#:# - 8:144 [active] ^ here ---+ --- libmultipath/print.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libmultipath/print.c b/libmultipath/print.c index de12526..68d39b6 100644 --- a/libmultipath/print.c +++ b/libmultipath/print.c @@ -173,7 +173,11 @@ snprint_path (char * line, int len, char * format, struct path * pp, PAD(pl->hbtl_len); break; case 'd': - PRINT(c, TAIL, "%s", pp->dev); + if (!strlen(pp->dev)) { + PRINT(c, TAIL, "-"); + } else { + PRINT(c, TAIL, "%s", pp->dev); + } PAD(pl->dev_len); break; case 'D': -- 2.7.4