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:
d46c36c
)
mdev: fix a trivial SEGV
author
Denys Vlasenko
<vda.linux@googlemail.com>
Tue, 16 Mar 2010 17:37:19 +0000
(18:37 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Tue, 16 Mar 2010 17:37:19 +0000
(18:37 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
util-linux/mdev.c
patch
|
blob
|
history
diff --git
a/util-linux/mdev.c
b/util-linux/mdev.c
index 9c9d95f8a08c24ba192727e628a971e615f8994d..3cee3a66904ba71ee681c1fa7694e0d2dc1919b0 100644
(file)
--- a/
util-linux/mdev.c
+++ b/
util-linux/mdev.c
@@
-140,7
+140,7
@@
static void make_device(char *path, int delete)
* But since 2.6.25 block devices are also in /sys/class/block.
* We use strstr("/block/") to forestall future surprises. */
type = S_IFCHR;
- if (strstr(path, "/block/") ||
strncmp(G.subsystem, "block", 5) == 0
)
+ if (strstr(path, "/block/") ||
(G.subsystem && strncmp(G.subsystem, "block", 5) == 0)
)
type = S_IFBLK;
/* Make path point to "subsystem/device_name" */