Contents of /trunk/busybox/patches/busybox-1.13.2-mdev.patch
Parent Directory | Revision Log
Revision 747 -
(show annotations)
(download)
Mon Jan 12 19:11:05 2009 UTC (15 years, 8 months ago) by niro
File size: 1300 byte(s)
Mon Jan 12 19:11:05 2009 UTC (15 years, 8 months ago) by niro
File size: 1300 byte(s)
official patches for 1.13.2
1 | --- busybox-1.13.2/testsuite/mdev.tests Sun Nov 9 18:28:19 2008 |
2 | +++ busybox-1.13.2-mdev/testsuite/mdev.tests Mon Jan 12 08:59:15 2009 |
3 | @@ -111,6 +111,22 @@ |
4 | |
5 | # continuing to use directory structure from prev test |
6 | rm -rf mdev.testdir/dev/* |
7 | +echo "sda 0:0 644 =block/ @echo @echo TEST" >mdev.testdir/etc/mdev.conf |
8 | +testing "mdev move and command" \ |
9 | + "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1; |
10 | + ls -lnR mdev.testdir/dev | $FILTER_LS2" \ |
11 | +"\ |
12 | +@echo TEST |
13 | +mdev.testdir/dev: |
14 | +drwxr-xr-x 2 0 0 block |
15 | + |
16 | +mdev.testdir/dev/block: |
17 | +brw-r--r-- 1 0 0 sda |
18 | +" \ |
19 | + "" "" |
20 | + |
21 | +# continuing to use directory structure from prev test |
22 | +rm -rf mdev.testdir/dev/* |
23 | echo "@8,0 :1 644" >mdev.testdir/etc/mdev.conf |
24 | testing "mdev #maj,min and no explicit uid" \ |
25 | "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1; |
26 | --- busybox-1.13.2/util-linux/mdev.c Sun Nov 9 18:28:22 2008 |
27 | +++ busybox-1.13.2-mdev/util-linux/mdev.c Mon Jan 12 08:59:15 2009 |
28 | @@ -179,8 +179,9 @@ |
29 | unsigned i, n; |
30 | #endif |
31 | char *a = val; |
32 | - s = strchr(val, ' '); |
33 | - val = (s && s[1]) ? s+1 : NULL; |
34 | + s = strchrnul(val, ' '); |
35 | + val = (s[0] && s[1]) ? s+1 : NULL; |
36 | + s[0] = '\0'; |
37 | #if ENABLE_FEATURE_MDEV_RENAME_REGEXP |
38 | /* substitute %1..9 with off[1..9], if any */ |
39 | n = 0; |