diff options
author | landley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-01-12 03:07:49 +0000 |
---|---|---|
committer | landley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-01-12 03:07:49 +0000 |
commit | b778f3e073ccb8590ff7225019210b304aac30b9 (patch) | |
tree | eb80845f808711262925bf74f6261635c79955a7 | |
parent | 2f430b645785992454e1e195df2951ed80601460 (diff) | |
download | busybox-w32-b778f3e073ccb8590ff7225019210b304aac30b9.tar.gz busybox-w32-b778f3e073ccb8590ff7225019210b304aac30b9.tar.bz2 busybox-w32-b778f3e073ccb8590ff7225019210b304aac30b9.zip |
The major:minor read from dev ends with \n, need to trim that.
git-svn-id: svn://busybox.net/trunk/busybox@13253 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r-- | util-linux/mdev.c | 2 |
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) | |||
42 | fd = open(temp, O_RDONLY); | 42 | fd = open(temp, O_RDONLY); |
43 | len = read(fd, temp, PATH_MAX-1); | 43 | len = read(fd, temp, PATH_MAX-1); |
44 | if (len<1) goto end; | 44 | if (len<1) goto end; |
45 | temp[len] = 0; | 45 | temp[--len] = 0; // remove trailing \n |
46 | close(fd); | 46 | close(fd); |
47 | 47 | ||
48 | /* Determine device name, type, major and minor */ | 48 | /* Determine device name, type, major and minor */ |