]> git.ipfire.org Git - thirdparty/util-linux.git/blame - login-utils/sulogin-consoles.h
scriptreplay: cleanup usage()
[thirdparty/util-linux.git] / login-utils / sulogin-consoles.h
CommitLineData
3a08f74f
WF
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.
cae29b37 5 * Copyright (c) 2012 Werner Fink <werner@suse.de>
3a08f74f
WF
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
10 * any later version.
2bb3aa36 11 *
3a08f74f
WF
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program (see the file COPYING); if not, write to the
19 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
20 * MA 02110-1301, USA.
21 *
22 * Author: Werner Fink <werner@suse.de>
23 */
4226f910
KZ
24#ifndef UTIL_LINUX_SULOGIN_CONSOLES_H
25#define UTIL_LINUX_SULOGIN_CONSOLES_H
3a08f74f
WF
26
27#include <sys/types.h>
28#include <stdint.h>
29#include <stdio.h>
30#include <termios.h>
31
f5664477 32#include "list.h"
a73f59fa
KZ
33#include "ttyutils.h"
34
3a08f74f 35struct console {
cae29b37 36 struct list_head entry;
3a08f74f
WF
37 char *tty;
38 FILE *file;
39 uint32_t flags;
40 int fd, id;
41#define CON_SERIAL 0x0001
42#define CON_NOTTY 0x0002
43 pid_t pid;
44 struct chardata cp;
45 struct termios tio;
3a08f74f 46};
cf987d0a
KZ
47
48extern int detect_consoles(const char *device, int fallback,
cae29b37 49 struct list_head *consoles);
4226f910
KZ
50
51extern void emergency_do_umounts(void);
52extern void emergency_do_mounts(void);
53
54#endif /* UTIL_LINUX_SULOGIN_CONSOLES_H */