summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2012-04-21 12:35:32 (GMT)
committer Denys Vlasenko <vda.linux@googlemail.com>2012-04-21 12:35:32 (GMT)
commitc9665631d37daeb90084a28b3f339ce5296677a9 (patch)
tree9f1df7f8b0ee3c941bc8b830a2383e399ddae0e8
parentdf9196d824ea9bca7590edade631362e89b5c6ce (diff)
downloadbusybox-c9665631d37daeb90084a28b3f339ce5296677a9.tar.gz
busybox-c9665631d37daeb90084a28b3f339ce5296677a9.tar.bz2
mdev: fix mode of creatred node if config file support is not configured
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--util-linux/mdev.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/util-linux/mdev.c b/util-linux/mdev.c
index 67de52d..0a34122 100644
--- a/util-linux/mdev.c
+++ b/util-linux/mdev.c
@@ -164,7 +164,10 @@ struct globals {
struct rule cur_rule;
} FIX_ALIASING;
#define G (*(struct globals*)&bb_common_bufsiz1)
-#define INIT_G() do { } while (0)
+#define INIT_G() do { \
+ IF_NOT_FEATURE_MDEV_CONF(G.cur_rule.maj = -1;) \
+ IF_NOT_FEATURE_MDEV_CONF(G.cur_rule.mode = 0660;) \
+} while (0)
/* Prevent infinite loops in /sys symlinks */
@@ -477,9 +480,8 @@ static void make_device(char *path, int delete)
}
}
/* else: it's final implicit "match-all" rule */
-#endif
-
rule_matches:
+#endif
dbg("rule matched");
/* Build alias name */