summaryrefslogtreecommitdiffstats
path: root/include/consoles.h
diff options
context:
space:
mode:
authorWerner Fink2012-12-18 15:02:35 +0100
committerKarel Zak2012-12-18 15:02:35 +0100
commitcae29b3717dc08899faaa0adff818fe63a2c88b7 (patch)
treef02a16454ee861953c2132433c8db2c71f2f40ca /include/consoles.h
parentinclude/list: add list_last_entry() (diff)
downloadkernel-qcow2-util-linux-cae29b3717dc08899faaa0adff818fe63a2c88b7.tar.gz
kernel-qcow2-util-linux-cae29b3717dc08899faaa0adff818fe63a2c88b7.tar.xz
kernel-qcow2-util-linux-cae29b3717dc08899faaa0adff818fe63a2c88b7.zip
sulogin: use the linked lists from list.h for consoles list
with this the double linked list feature from util-linux is used instead of the single linked list. [kzak@redhat.com: use list_last_entry() and list INIT macros] Signed-off-by: Werner Fink <werner@suse.de> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'include/consoles.h')
-rw-r--r--include/consoles.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/consoles.h b/include/consoles.h
index 2283d024b..25442631b 100644
--- a/include/consoles.h
+++ b/include/consoles.h
@@ -2,6 +2,7 @@
* 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
@@ -25,6 +26,7 @@
#include <stdint.h>
#include <stdio.h>
#include <termios.h>
+#include <list.h>
struct chardata {
uint8_t erase;
@@ -33,6 +35,7 @@ struct chardata {
uint8_t parity;
};
struct console {
+ struct list_head entry;
char *tty;
FILE *file;
uint32_t flags;
@@ -42,8 +45,7 @@ struct console {
pid_t pid;
struct chardata cp;
struct termios tio;
- struct console *next;
};
extern int detect_consoles(const char *device, int fallback,
- struct console **consoles);
+ struct list_head *consoles);