mdev: fix a bug where \t is not treated as delimiter after [>|=PATH]
No binary (build failed)
—
(log yok)
| @@ -173,13 +173,16 @@ static void make_device(char *path, int delete) | |
| break; | |
| aliaslink = *val; | |
| if (aliaslink == '>' || aliaslink == '=') { | |
| - | char *s; |
| + | char *s, *st; |
| # if ENABLE_FEATURE_MDEV_RENAME_REGEXP | |
| char *p; | |
| unsigned i, n; | |
| # endif | |
| char *a = val; | |
| s = strchrnul(val, ' '); | |
| + | st = strchrnul(val, '\t'); |
| + | if (st < s) |
| + | s = st; |
| val = (s[0] && s[1]) ? s+1 : NULL; | |
| s[0] = '\0'; | |
| # if ENABLE_FEATURE_MDEV_RENAME_REGEXP | |