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:
32ef013
)
Fixup %n to handle '!' special case
author
Hannes Reinecke
<hare@suse.de>
Wed, 29 Oct 2008 15:58:52 +0000
(16:58 +0100)
committer
Christophe Varoqui
<christophe.varoqui@free.fr>
Tue, 21 Apr 2009 21:36:58 +0000
(23:36 +0200)
The kernel name may contain an '!', which should be translated
into a '/'. So do it here.
Signed-off-by: Hannes Reinecke <hare@suse.de>
libmultipath/callout.c
patch
|
blob
|
history
diff --git
a/libmultipath/callout.c
b/libmultipath/callout.c
index
a0f74e9
..
520343e
100644
(file)
--- a/
libmultipath/callout.c
+++ b/
libmultipath/callout.c
@@
-148,6
+148,7
@@
apply_format (char * string, char * cmd, struct path * pp)
char * pos;
char * dst;
char * p;
+ char * q;
int len;
int myfree;
@@
-186,6
+187,10
@@
apply_format (char * string, char * cmd, struct path * pp)
return 1;
snprintf(p, len, "%s", pp->dev);
+ for (q = p; q < p + len; q++) {
+ if (q && *q == '!')
+ *q = '/';
+ }
p += len - 1;
break;
case 'd':