{
if (mpp->dmi)
return snprintf(buff, len, "dm-%i", mpp->dmi->minor);
-
- return 0;
+ else
+ return snprintf(buff, len, "n/a");
}
static int
}
static int
+snprint_multipath_vpr (char * buff, size_t len, struct multipath * mpp)
+{
+ struct path * pp = first_path(mpp);
+ if (!pp)
+ return 0;
+ return snprintf(buff, len, "%s,%s",
+ pp->vendor_id, pp->product_id);
+}
+
+static int
snprint_action (char * buff, size_t len, struct multipath * mpp)
{
switch (mpp->action) {
{'2', "map_loads", 0, snprint_map_loads},
{'3', "total_q_time", 0, snprint_total_q_time},
{'4', "q_timeouts", 0, snprint_q_timeouts},
+ {'s', "vend/prod/rev", 0, snprint_multipath_vpr},
{0, NULL, 0 , NULL}
};
if (strncmp(mpp->alias, mpp->wwid, WWID_SIZE))
c += sprintf(c, " (%%w)");
- c += sprintf(c, " %%d ");
- c += snprint_vpr(c, 24, first_path(mpp));
+ c += sprintf(c, " %%d %%s");
fwd += snprint_multipath(buff + fwd, len - fwd, style, mpp);
if (fwd > len)