Changeset 2725 in MondoRescue for branches/2.2.9/mindi-busybox/console-tools/deallocvt.c
- Timestamp:
- Feb 25, 2011, 9:26:54 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mindi-busybox/console-tools/deallocvt.c
r1765 r2725 6 6 * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> 7 7 * 8 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.8 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 9 9 */ 10 10 … … 16 16 enum { VT_DISALLOCATE = 0x5608 }; /* free memory associated to vt */ 17 17 18 int deallocvt_main(int argc, char **argv) ;19 int deallocvt_main(int argc , char **argv)18 int deallocvt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 19 int deallocvt_main(int argc UNUSED_PARAM, char **argv) 20 20 { 21 21 /* num = 0 deallocate all unused consoles */ 22 22 int num = 0; 23 23 24 switch (argc) { 25 case 2: 24 if (argv[1]) { 25 if (argv[2]) 26 bb_show_usage(); 26 27 num = xatou_range(argv[1], 1, 63); 27 /* Fallthrough */28 case 1:29 break;30 default:31 bb_show_usage();32 28 } 33 29 34 /* double cast suppresses "cast to ptr from int of different size */35 xioctl(get_console_fd (), VT_DISALLOCATE, (void *)(ptrdiff_t)num);30 /* double cast suppresses "cast to ptr from int of different size" */ 31 xioctl(get_console_fd_or_die(), VT_DISALLOCATE, (void *)(ptrdiff_t)num); 36 32 return EXIT_SUCCESS; 37 33 }
Note:
See TracChangeset
for help on using the changeset viewer.