mirror of
https://github.com/sheumann/hush.git
synced 2024-12-21 23:29:34 +00:00
mdev: fix a bug where \t is not treated as delimiter after [>|=PATH]
This commit is contained in:
parent
aafbae6181
commit
323cbbfaa2
@ -173,13 +173,16 @@ static void make_device(char *path, int delete)
|
|||||||
break;
|
break;
|
||||||
aliaslink = *val;
|
aliaslink = *val;
|
||||||
if (aliaslink == '>' || aliaslink == '=') {
|
if (aliaslink == '>' || aliaslink == '=') {
|
||||||
char *s;
|
char *s, *st;
|
||||||
# if ENABLE_FEATURE_MDEV_RENAME_REGEXP
|
# if ENABLE_FEATURE_MDEV_RENAME_REGEXP
|
||||||
char *p;
|
char *p;
|
||||||
unsigned i, n;
|
unsigned i, n;
|
||||||
# endif
|
# endif
|
||||||
char *a = val;
|
char *a = val;
|
||||||
s = strchrnul(val, ' ');
|
s = strchrnul(val, ' ');
|
||||||
|
st = strchrnul(val, '\t');
|
||||||
|
if (st < s)
|
||||||
|
s = st;
|
||||||
val = (s[0] && s[1]) ? s+1 : NULL;
|
val = (s[0] && s[1]) ? s+1 : NULL;
|
||||||
s[0] = '\0';
|
s[0] = '\0';
|
||||||
# if ENABLE_FEATURE_MDEV_RENAME_REGEXP
|
# if ENABLE_FEATURE_MDEV_RENAME_REGEXP
|
||||||
|
Loading…
Reference in New Issue
Block a user