mirror of
https://git.busybox.net/busybox.git
synced 2024-12-01 01:23:32 +08:00
Fix stupid bugs. update was segfaulting. mknod minor # was always 0
due to a parsing bug. Oops. -Erik
This commit is contained in:
parent
abc199eb0c
commit
6ed02a0ee0
@ -4,6 +4,8 @@
|
||||
* Added mktemp, contributed by Daniel Jacobowitz <dan@debian.org>
|
||||
* Fix for ping warnings from Sascha Ziemann <szi@aibon.ping.de>
|
||||
* More doc updates
|
||||
* Fixed update segfault
|
||||
* Fixed mknod -- minor number was always 0
|
||||
|
||||
|
||||
0.43
|
||||
|
@ -58,6 +58,7 @@ int mknod_main(int argc, char **argv)
|
||||
argc--;
|
||||
argv++;
|
||||
parse_mode(*argv, &perm);
|
||||
umask(0);
|
||||
break;
|
||||
default:
|
||||
usage(mknod_usage);
|
||||
@ -87,7 +88,7 @@ int mknod_main(int argc, char **argv)
|
||||
}
|
||||
|
||||
if (mode == S_IFCHR || mode == S_IFBLK) {
|
||||
dev = (atoi(argv[2]) << 8) | atoi(argv[1]);
|
||||
dev = (atoi(argv[2]) << 8) | atoi(argv[3]);
|
||||
}
|
||||
|
||||
mode |= perm;
|
||||
|
@ -52,7 +52,7 @@ extern int update_main(int argc, char **argv)
|
||||
|
||||
argc--;
|
||||
argv++;
|
||||
while (**argv == '-') {
|
||||
while (argc>0 && **argv == '-') {
|
||||
while (*++(*argv)) {
|
||||
switch (**argv) {
|
||||
case 'S':
|
||||
|
3
mknod.c
3
mknod.c
@ -58,6 +58,7 @@ int mknod_main(int argc, char **argv)
|
||||
argc--;
|
||||
argv++;
|
||||
parse_mode(*argv, &perm);
|
||||
umask(0);
|
||||
break;
|
||||
default:
|
||||
usage(mknod_usage);
|
||||
@ -87,7 +88,7 @@ int mknod_main(int argc, char **argv)
|
||||
}
|
||||
|
||||
if (mode == S_IFCHR || mode == S_IFBLK) {
|
||||
dev = (atoi(argv[2]) << 8) | atoi(argv[1]);
|
||||
dev = (atoi(argv[2]) << 8) | atoi(argv[3]);
|
||||
}
|
||||
|
||||
mode |= perm;
|
||||
|
Loading…
Reference in New Issue
Block a user