svn commit: [26125] trunk/busybox: testsuite util-linux

vda at busybox.net vda at busybox.net
Thu Apr 16 22:42:02 UTC 2009


Author: vda
Date: 2009-04-16 22:42:01 +0000 (Thu, 16 Apr 2009)
New Revision: 26125

Log:
mdev: set mode, needed when device node already exists.



Modified:
   trunk/busybox/testsuite/mdev.tests
   trunk/busybox/util-linux/mdev.c


Changeset:
Modified: trunk/busybox/testsuite/mdev.tests
===================================================================
--- trunk/busybox/testsuite/mdev.tests	2009-04-16 21:42:12 UTC (rev 26124)
+++ trunk/busybox/testsuite/mdev.tests	2009-04-16 22:42:01 UTC (rev 26125)
@@ -49,6 +49,18 @@
 
 # continuing to use directory structure from prev test
 rm -rf mdev.testdir/dev/*
+echo "-.* 1:1 666" >mdev.testdir/etc/mdev.conf
+echo "sda 2:2 444" >>mdev.testdir/etc/mdev.conf
+testing "mdev does not stop on dash-rule" \
+	"env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
+	ls -ln mdev.testdir/dev | $FILTER_LS" \
+"\
+br--r--r-- 1 2 2 8,0 sda
+" \
+	"" ""
+
+# continuing to use directory structure from prev test
+rm -rf mdev.testdir/dev/*
 echo "sda 0:0 444 >disk/scsiA" >mdev.testdir/etc/mdev.conf
 testing "mdev move/symlink rule '>bar/baz'" \
 	"env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;

Modified: trunk/busybox/util-linux/mdev.c
===================================================================
--- trunk/busybox/util-linux/mdev.c	2009-04-16 21:42:12 UTC (rev 26124)
+++ trunk/busybox/util-linux/mdev.c	2009-04-16 22:42:01 UTC (rev 26125)
@@ -274,6 +274,7 @@
 			if (major == root_major && minor == root_minor)
 				symlink(device_name, "root");
 #if ENABLE_FEATURE_MDEV_CONF
+			chmod(device_name, mode);
 			chown(device_name, ugid.uid, ugid.gid);
 # if ENABLE_FEATURE_MDEV_RENAME
 			if (alias) {



More information about the busybox-cvs mailing list