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/libbb/get_console.c

    r1765 r2725  
    66 * acknowledge your work.
    77 *
    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.
    99 */
    1010
    11 //#include <sys/ioctl.h>
    1211#include "libbb.h"
    13 
    1412
    1513/* From <linux/kd.h> */
    1614enum { KDGKBTYPE = 0x4B33 };  /* get keyboard type */
    17 
    1815
    1916static int open_a_console(const char *fnam)
     
    4037 * if someone else used X (which does a chown on /dev/console).
    4138 */
    42 
    43 int get_console_fd(void)
     39int FAST_FUNC get_console_fd_or_die(void)
    4440{
    4541    static const char *const console_names[] = {
     
    6864    }
    6965
    70     bb_error_msg("cannot get file descriptor referring to console");
    71     return fd;                      /* total failure */
     66    bb_error_msg_and_die("can't open console");
     67    /*return fd; - total failure */
    7268}
     69
     70/* From <linux/vt.h> */
     71enum {
     72    VT_ACTIVATE = 0x5606,   /* make vt active */
     73    VT_WAITACTIVE = 0x5607  /* wait for vt active */
     74};
     75
     76void FAST_FUNC console_make_active(int fd, const int vt_num)
     77{
     78    xioctl(fd, VT_ACTIVATE, (void *)(ptrdiff_t)vt_num);
     79    xioctl(fd, VT_WAITACTIVE, (void *)(ptrdiff_t)vt_num);
     80}
Note: See TracChangeset for help on using the changeset viewer.