You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
genkernel_fork/patches/busybox/1.7.4/1.7.4-openvt.diff

21 lines
863 B

Allow a slightly wider range of valid vt numbers. Forward-ported from Gentoo
Busybox 1.1.3.
The previous spin of this patch on 1.1.3 had a 'wait(NULL);' right before
return EXIT_SUCCESS. I don't think it's needed anymore, so I left it out.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
diff -Nuar --exclude '*.orig' busybox-1.7.4/console-tools/openvt.c busybox-1.7.4+gentoo/console-tools/openvt.c
--- busybox-1.7.4/console-tools/openvt.c 2007-09-03 04:48:35.000000000 -0700
+++ busybox-1.7.4+gentoo/console-tools/openvt.c 2008-03-10 10:00:55.000000000 -0700
@@ -21,7 +21,7 @@
bb_show_usage();
/* check for illegal vt number: < 1 or > 63 */
- sprintf(vtname, VC_FORMAT, (int)xatou_range(argv[1], 1, 63));
+ sprintf(vtname, VC_FORMAT, (int)xatou_range(argv[1], 0, 63));
bb_daemonize_or_rexec(DAEMON_CLOSE_EXTRA_FDS, argv);
/* grab new one */