Ignore:
Timestamp:
Feb 25, 2011, 9:26:54 PM (13 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.18.3 to avoid problems with the tar command which is now failing on recent versions with busybox 1.7.3
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi-busybox/console-tools/chvt.c

    r1765 r2725  
    55 * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
    66 *
    7  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
     7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
    88 */
    9 
    109#include "libbb.h"
    1110
    12 /* From <linux/vt.h> */
    13 enum {
    14     VT_ACTIVATE = 0x5606,   /* make vt active */
    15     VT_WAITACTIVE = 0x5607  /* wait for vt active */
    16 };
    17 
    18 int chvt_main(int argc, char **argv);
    19 int chvt_main(int argc, char **argv)
     11int chvt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
     12int chvt_main(int argc UNUSED_PARAM, char **argv)
    2013{
    21     int fd, num;
    22 
    23     if (argc != 2) {
    24         bb_show_usage();
    25     }
    26 
    27     fd = get_console_fd();
    28     num = xatou_range(argv[1], 1, 63);
    29     /* double cast suppresses "cast to ptr from int of different size */
    30     xioctl(fd, VT_ACTIVATE, (void *)(ptrdiff_t)num);
    31     xioctl(fd, VT_WAITACTIVE, (void *)(ptrdiff_t)num);
     14    int num = xatou_range(single_argv(argv), 1, 63);
     15    console_make_active(get_console_fd_or_die(), num);
    3216    return EXIT_SUCCESS;
    3317}
Note: See TracChangeset for help on using the changeset viewer.