From 9407756683b0ae9e2e00530f3abcff894dd204a7 Mon Sep 17 00:00:00 2001 From: Christophe Varoqui Date: Sun, 30 Nov 2008 23:56:46 +0100 Subject: [PATCH] [lib] add '%c' wildcard to display path checker type in cli $ sudo multipathd show paths format "%d %i %c" dev hcil checker sdb 5:0:0:0 readsector0 sdc 5:0:0:1 readsector0 --- libmultipath/print.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libmultipath/print.c b/libmultipath/print.c index 595067b..a2253be 100644 --- a/libmultipath/print.c +++ b/libmultipath/print.c @@ -406,6 +406,13 @@ snprint_path_size (char * buff, size_t len, struct path * pp) return snprint_size(buff, len, pp->size); } +static int +snprint_path_checker (char * buff, size_t len, struct path * pp) +{ + struct checker * c = &pp->checker; + return snprint_str(buff, len, c->name); +} + struct multipath_data mpd[] = { {'n', "name", 0, snprint_name}, {'w', "uuid", 0, snprint_multipath_uuid}, @@ -437,6 +444,7 @@ struct path_data pd[] = { {'o', "dev_st", 0, snprint_offline}, {'T', "chk_st", 0, snprint_chk_state}, {'s', "vend/prod/rev", 0, snprint_vpr}, + {'c', "checker", 0, snprint_path_checker}, {'C', "next_check", 0, snprint_next_check}, {'p', "pri", 0, snprint_pri}, {'S', "size", 0, snprint_path_size}, -- 2.7.4