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