aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-01-12 03:07:49 +0000
committerRob Landley <rob@landley.net>2006-01-12 03:07:49 +0000
commit1c19deed17f21792fcc485038b6173b9b4c186f1 (patch)
treeeb80845f808711262925bf74f6261635c79955a7
parentbbf4e167f2caa248ba0eaa05b89d02b8d8f9e4ae (diff)
downloadbusybox-1c19deed17f21792fcc485038b6173b9b4c186f1.tar.gz
The major:minor read from dev ends with \n, need to trim that.
-rw-r--r--util-linux/mdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util-linux/mdev.c b/util-linux/mdev.c
index d414c0c10..10369ded3 100644
--- a/util-linux/mdev.c
+++ b/util-linux/mdev.c
@@ -42,7 +42,7 @@ static void make_device(char *path)
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 */