[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [PATCH 4/8] mdev: handle string modes
From:       Bernhard Reutner-Fischer <rep.dot.nop () gmail ! com>
Date:       2009-10-26 22:27:05
Message-ID: 1256596029-511-5-git-send-email-rep.dot.nop () gmail ! com
[Download RAW message or body]

parse ugoa=rwxXst via bb_parse_mode (+5b)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.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 9d480a7..f4a2b0d 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

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic