]>
Commit | Line | Data |
---|---|---|
32c9fc6d DWF |
1 | /* |
2 | * consoles.h Header file for routines to detect the system consoles | |
3 | * | |
4 | * Copyright (c) 2011 SuSE LINUX Products GmbH, All rights reserved. | |
5 | * | |
6 | * This program is free software; you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License as published by | |
8 | * the Free Software Foundation; either version 2, or (at your option) | |
9 | * any later version. | |
10 | * | |
11 | * This program is distributed in the hope that it will be useful, | |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | * GNU General Public License for more details. | |
15 | * | |
16 | * You should have received a copy of the GNU General Public License | |
17 | * along with this program (see the file COPYING); if not, write to the | |
18 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, | |
19 | * MA 02110-1301, USA. | |
20 | * | |
21 | * Author: Werner Fink <werner@suse.de> | |
22 | */ | |
23 | ||
d212d886 DWF |
24 | #include <sys/types.h> |
25 | #include <stdint.h> | |
26 | #include <stdio.h> | |
32c9fc6d DWF |
27 | #include <termios.h> |
28 | ||
d212d886 DWF |
29 | struct chardata { |
30 | uint8_t erase; | |
31 | uint8_t kill; | |
32 | uint8_t eol; | |
33 | uint8_t parity; | |
34 | }; | |
32c9fc6d | 35 | struct console { |
d212d886 DWF |
36 | char *tty; |
37 | FILE *file; | |
38 | uint32_t flags; | |
39 | int fd, id; | |
40 | #define CON_SERIAL 0x0001 | |
41 | #define CON_NOTTY 0x0002 | |
42 | pid_t pid; | |
43 | struct chardata cp; | |
44 | struct termios tio; | |
32c9fc6d DWF |
45 | struct console *next; |
46 | }; | |
47 | extern struct console *consoles; | |
4befa570 | 48 | extern void detect_consoles(const char *, int); |