Changeset 1770 in MondoRescue for branches/stable/mindi-busybox/console-tools/setlogcons.c
- Timestamp:
- Nov 6, 2007, 11:01:53 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mindi-busybox/console-tools/setlogcons.c
r821 r1770 1 /* vi: set sw=4 ts=4: */ 1 2 /* 2 * setlogcons: Send kernel messages to the current console or to console N 3 * setlogcons: Send kernel messages to the current console or to console N 3 4 * 4 5 * Copyright (C) 2006 by Jan Kiszka <jan.kiszka@web.de> … … 9 10 */ 10 11 11 #include <stdio.h> 12 #include <stdlib.h> 13 #include <fcntl.h> 14 #include <sys/ioctl.h> 15 #include "busybox.h" 12 #include "libbb.h" 16 13 17 extern int setlogcons_main(int argc, char **argv) 14 int setlogcons_main(int argc, char **argv); 15 int setlogcons_main(int argc, char **argv) 18 16 { 19 17 struct { … … 26 24 27 25 if (argc == 2) 28 arg.subarg = atoi(argv[1]);26 arg.subarg = xatoul_range(argv[1], 0, 63); 29 27 30 if (ioctl(bb_xopen(VC_1, O_RDONLY), TIOCLINUX, &arg)) 31 bb_perror_msg_and_die("TIOCLINUX");; 28 xioctl(xopen(VC_1, O_RDONLY), TIOCLINUX, &arg); 32 29 33 30 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.