Doing a "show topo" after "show maps" gave different output than "show topo"
on a freshly started multipathd or than "multipath -ll". This is due to
"show map" doing a get_multipath_layout(), which result is persistent, and
affects all subsequent users of the snprint_*() functions.
This patch ensures a predictable output format by reseting the multipath
field widths in snprint_multipath_topology().
}
}
+static void
+reset_multipath_layout (void)
+{
+ int i;
+
+ for (i = 0; mpd[i].header; i++)
+ mpd[i].width = 0;
+}
+
void
get_multipath_layout (vector mpvec, int header)
{
if (verbosity <= 0)
return fwd;
+ reset_multipath_layout();
+
if (verbosity == 1)
return snprint_multipath(buff, len, "%n", mpp);