mdev: fix breakage caused by unified parser usage
This commit is contained in:
parent
f0dc2c1d5c
commit
319fe129a1
@ -109,6 +109,22 @@ brw-r--r-- 1 0 0 8,0 sda
|
|||||||
" \
|
" \
|
||||||
"" ""
|
"" ""
|
||||||
|
|
||||||
|
# continuing to use directory structure from prev test
|
||||||
|
rm -rf mdev.testdir/dev/*
|
||||||
|
echo "sda 0:0 644 =block/ @echo @echo TEST" >mdev.testdir/etc/mdev.conf
|
||||||
|
testing "mdev move and command" \
|
||||||
|
"env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
|
||||||
|
ls -lnR mdev.testdir/dev | $FILTER_LS2" \
|
||||||
|
"\
|
||||||
|
@echo TEST
|
||||||
|
mdev.testdir/dev:
|
||||||
|
drwxr-xr-x 2 0 0 block
|
||||||
|
|
||||||
|
mdev.testdir/dev/block:
|
||||||
|
brw-r--r-- 1 0 0 sda
|
||||||
|
" \
|
||||||
|
"" ""
|
||||||
|
|
||||||
# continuing to use directory structure from prev test
|
# continuing to use directory structure from prev test
|
||||||
rm -rf mdev.testdir/dev/*
|
rm -rf mdev.testdir/dev/*
|
||||||
echo "@8,0 :1 644" >mdev.testdir/etc/mdev.conf
|
echo "@8,0 :1 644" >mdev.testdir/etc/mdev.conf
|
||||||
|
@ -179,8 +179,9 @@ static void make_device(char *path, int delete)
|
|||||||
unsigned i, n;
|
unsigned i, n;
|
||||||
#endif
|
#endif
|
||||||
char *a = val;
|
char *a = val;
|
||||||
s = strchr(val, ' ');
|
s = strchrnul(val, ' ');
|
||||||
val = (s && s[1]) ? s+1 : NULL;
|
val = (s[0] && s[1]) ? s+1 : NULL;
|
||||||
|
s[0] = '\0';
|
||||||
#if ENABLE_FEATURE_MDEV_RENAME_REGEXP
|
#if ENABLE_FEATURE_MDEV_RENAME_REGEXP
|
||||||
/* substitute %1..9 with off[1..9], if any */
|
/* substitute %1..9 with off[1..9], if any */
|
||||||
n = 0;
|
n = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user