Add %z path wildcard to display path serial
authorChristophe Varoqui <christophe.varoqui@opensvc.com>
Fri, 22 Jan 2010 09:51:29 +0000 (10:51 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Fri, 22 Jan 2010 09:51:29 +0000 (10:51 +0100)
libmultipath/print.c

index ba77b9c..10e5ce5 100644 (file)
@@ -409,6 +409,12 @@ snprint_path_size (char * buff, size_t len, struct path * pp)
        return snprint_size(buff, len, pp->size);
 }
 
+static int
+snprint_path_serial (char * buff, size_t len, struct path * pp)
+{
+       return snprint_str(buff, len, pp->serial);
+}
+
 static int
 snprint_path_checker (char * buff, size_t len, struct path * pp)
 {
@@ -451,6 +457,7 @@ struct path_data pd[] = {
        {'C', "next_check",    0, snprint_next_check},
        {'p', "pri",           0, snprint_pri},
        {'S', "size",          0, snprint_path_size},
+       {'z', "serial",        0, snprint_path_serial},
        {0, NULL, 0 , NULL}
 };