diff options
| author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2009-10-26 23:27:05 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-10-27 17:13:12 +0100 |
| commit | 933993a4618edd0778324c4887febc1b92d6603b (patch) | |
| tree | 4a1c3d93acf6096ef67924592fb01ffceea664bd /util-linux/mdev.c | |
| parent | 6531f0923bc3c288291aa979a0e06daab964f008 (diff) | |
| download | busybox-w32-933993a4618edd0778324c4887febc1b92d6603b.tar.gz busybox-w32-933993a4618edd0778324c4887febc1b92d6603b.tar.bz2 busybox-w32-933993a4618edd0778324c4887febc1b92d6603b.zip | |
mdev: handle string modes
parse ugoa=rwxXst via bb_parse_mode (+5b)
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux/mdev.c')
| -rw-r--r-- | 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 d0aafac6e..e4bc6653d 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c | |||
| @@ -111,7 +111,7 @@ static void make_device(char *path, int delete) | |||
| 111 | { | 111 | { |
| 112 | char *device_name; | 112 | char *device_name; |
| 113 | int major, minor, type, len; | 113 | int major, minor, type, len; |
| 114 | int mode; | 114 | mode_t mode; |
| 115 | parser_t *parser; | 115 | parser_t *parser; |
| 116 | 116 | ||
| 117 | /* Try to read major/minor string. Note that the kernel puts \n after | 117 | /* 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) | |||
| 249 | bb_error_msg("unknown user/group %s", tokens[1]); | 249 | bb_error_msg("unknown user/group %s", tokens[1]); |
| 250 | 250 | ||
| 251 | /* 3rd field: mode - device permissions */ | 251 | /* 3rd field: mode - device permissions */ |
| 252 | mode = strtoul(tokens[2], NULL, 8); | 252 | /* mode = strtoul(tokens[2], NULL, 8); */ |
| 253 | bb_parse_mode(tokens[2], &mode); | ||
| 253 | 254 | ||
| 254 | val = tokens[3]; | 255 | val = tokens[3]; |
| 255 | /* 4th field (opt): >|=alias */ | 256 | /* 4th field (opt): >|=alias */ |
