svn commit: trunk/busybox/util-linux

landley at busybox.net landley at busybox.net
Thu Jan 12 03:07:49 UTC 2006


Author: landley
Date: 2006-01-11 19:07:49 -0800 (Wed, 11 Jan 2006)
New Revision: 13253

Log:
The major:minor read from dev ends with \n, need to trim that.


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


Changeset:
Modified: trunk/busybox/util-linux/mdev.c
===================================================================
--- trunk/busybox/util-linux/mdev.c	2006-01-12 03:07:34 UTC (rev 13252)
+++ trunk/busybox/util-linux/mdev.c	2006-01-12 03:07:49 UTC (rev 13253)
@@ -42,7 +42,7 @@
 	fd = open(temp, O_RDONLY);
 	len = read(fd, temp, PATH_MAX-1);
 	if (len<1) goto end;
-	temp[len] = 0;
+	temp[--len] = 0; // remove trailing \n
 	close(fd);
 	
 	/* Determine device name, type, major and minor */




More information about the busybox-cvs mailing list