[git commit master] mdev: handle string modes
Denys Vlasenko
vda.linux at googlemail.com
Tue Oct 27 16:13:12 UTC 2009
commit: http://git.busybox.net/busybox/commit/?id=933993a4618edd0778324c4887febc1b92d6603b
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master
parse ugoa=rwxXst via bb_parse_mode (+5b)
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
util-linux/mdev.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/util-linux/mdev.c b/util-linux/mdev.c
index d0aafac..e4bc665 100644
--- a/util-linux/mdev.c
+++ b/util-linux/mdev.c
@@ -111,7 +111,7 @@ static void make_device(char *path, int delete)
{
char *device_name;
int major, minor, type, len;
- int mode;
+ mode_t mode;
parser_t *parser;
/* Try to read major/minor string. Note that the kernel puts \n after
@@ -249,7 +249,8 @@ static void make_device(char *path, int delete)
bb_error_msg("unknown user/group %s", tokens[1]);
/* 3rd field: mode - device permissions */
- mode = strtoul(tokens[2], NULL, 8);
+ /* mode = strtoul(tokens[2], NULL, 8); */
+ bb_parse_mode(tokens[2], &mode);
val = tokens[3];
/* 4th field (opt): >|=alias */
--
1.6.3.3
More information about the busybox-cvs
mailing list