diff options
author | Karel Zak | 2012-12-23 22:14:21 +0100 |
---|---|---|
committer | Karel Zak | 2012-12-23 22:14:21 +0100 |
commit | a73f59fa03ad28d001cc09d185adf865d6fad8bd (patch) | |
tree | 20dd9c6df33b076ba85ea896455641b78af940b8 /include | |
parent | mkfs.minix: fsck:minix: fix compiler warnings (diff) | |
download | kernel-qcow2-util-linux-a73f59fa03ad28d001cc09d185adf865d6fad8bd.tar.gz kernel-qcow2-util-linux-a73f59fa03ad28d001cc09d185adf865d6fad8bd.tar.xz kernel-qcow2-util-linux-a73f59fa03ad28d001cc09d185adf865d6fad8bd.zip |
sulogin: remove consoles.c from libcommon
- move struct chardata to include/ttyutils.h
- move console.{h,c} to login-utils/sulogin-* (it's sulogin specific)
- fix sulogin and agetty includes
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/consoles.h | 51 | ||||
-rw-r--r-- | include/ttyutils.h | 9 |
2 files changed, 9 insertions, 51 deletions
diff --git a/include/consoles.h b/include/consoles.h deleted file mode 100644 index 25442631b..000000000 --- a/include/consoles.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * consoles.h Header file for routines to detect the system consoles - * - * Copyright (c) 2011 SuSE LINUX Products GmbH, All rights reserved. - * Copyright (c) 2012 Werner Fink <werner@suse.de> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program (see the file COPYING); if not, write to the - * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - * MA 02110-1301, USA. - * - * Author: Werner Fink <werner@suse.de> - */ - -#include <sys/types.h> -#include <stdint.h> -#include <stdio.h> -#include <termios.h> -#include <list.h> - -struct chardata { - uint8_t erase; - uint8_t kill; - uint8_t eol; - uint8_t parity; -}; -struct console { - struct list_head entry; - char *tty; - FILE *file; - uint32_t flags; - int fd, id; -#define CON_SERIAL 0x0001 -#define CON_NOTTY 0x0002 - pid_t pid; - struct chardata cp; - struct termios tio; -}; - -extern int detect_consoles(const char *device, int fallback, - struct list_head *consoles); diff --git a/include/ttyutils.h b/include/ttyutils.h index 93e89348a..767346172 100644 --- a/include/ttyutils.h +++ b/include/ttyutils.h @@ -8,6 +8,15 @@ #include <sys/ioctl.h> #endif +/* Storage for things detected while the login name was read. */ +struct chardata { + int erase; /* erase character */ + int kill; /* kill character */ + int eol; /* end-of-line character */ + int parity; /* what parity did we see */ + int capslock; /* upper case without lower case */ +}; + extern int get_terminal_width(void); extern int get_terminal_name(const char **path, const char **name, const char **number); |