1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- #include "libbb.h"
- int setlogcons_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
- int setlogcons_main(int argc UNUSED_PARAM, char **argv)
- {
- char *devname;
- struct {
- char fn;
- char subarg;
- } arg = {
- 11,
- 0
- };
- if (argv[1])
- arg.subarg = xatou_range(argv[1], 0, 63);
-
- devname = xasprintf("/dev/tty%u", arg.subarg);
- xioctl(xopen(devname, O_RDONLY), TIOCLINUX, &arg);
- return EXIT_SUCCESS;
- }
|