projects
/
platform
/
upstream
/
multipath-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eec3b7b
)
[lib] a little try with bold term chars
author
Christophe Varoqui
<christophe.varoqui@free.fr>
Wed, 19 Nov 2008 21:26:13 +0000
(22:26 +0100)
committer
Christophe Varoqui
<christophe.varoqui@free.fr>
Wed, 19 Nov 2008 21:26:13 +0000
(22:26 +0100)
... to force feedback from the community. If proven to be harmful,
I can still revert the change, but it really enhance readability of
"show topo" and "multipath -l", in my opinion.
libmultipath/print.c
patch
|
blob
|
history
diff --git
a/libmultipath/print.c
b/libmultipath/print.c
index
461e707
..
2ac5ad1
100644
(file)
--- a/
libmultipath/print.c
+++ b/
libmultipath/print.c
@@
-759,6
+759,8
@@
snprint_multipath_topology (char * buff, int len, struct multipath * mpp,
if (verbosity == 1)
return snprint_multipath(buff, len, "%n", mpp);
+ c += sprintf(c, "%c[%dm", 0x1B, 1); /* bold on */
+
if (verbosity > 1 &&
mpp->action != ACT_NOTHING &&
mpp->action != ACT_UNDEF)
@@
-770,6
+772,7
@@
snprint_multipath_topology (char * buff, int len, struct multipath * mpp,
c += sprintf(c, " (%%w)");
c += sprintf(c, " %%d %%s");
+ c += sprintf(c, "%c[%dm", 0x1B, 0); /* bold off */
fwd += snprint_multipath(buff + fwd, len - fwd, style, mpp);
if (fwd > len)