projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bbf4e16
)
The major:minor read from dev ends with \n, need to trim that.
author
Rob Landley
<rob@landley.net>
Thu, 12 Jan 2006 03:07:49 +0000
(
03:07
-0000)
committer
Rob Landley
<rob@landley.net>
Thu, 12 Jan 2006 03:07:49 +0000
(
03:07
-0000)
util-linux/mdev.c
patch
|
blob
|
history
diff --git
a/util-linux/mdev.c
b/util-linux/mdev.c
index d414c0c1033aa8651327a0d8cacb15281ea006f7..10369ded37bcbba0345abf3da9c69505f9513f8c 100644
(file)
--- 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 */