*
* busyboxed by Erik Andersen
*/
-#include "busybox.h"
+
+/* getopt not needed */
+
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/ioctl.h>
+#include "busybox.h"
/* From <linux/vt.h> */
static const int VT_ACTIVATE = 0x5606; /* make vt active */
int fd, num;
if ((argc != 2) || (**(argv + 1) == '-'))
- show_usage();
- fd = get_console_fd("/dev/console");
+ bb_show_usage();
+ fd = get_console_fd();
num = atoi(argv[1]);
if (ioctl(fd, VT_ACTIVATE, num))
- perror_msg_and_die("VT_ACTIVATE");
+ bb_perror_msg_and_die("VT_ACTIVATE");
if (ioctl(fd, VT_WAITACTIVE, num))
- perror_msg_and_die("VT_WAITACTIVE");
+ bb_perror_msg_and_die("VT_WAITACTIVE");
return EXIT_SUCCESS;
}