diff options
author | Werner Fink | 2012-12-18 15:02:35 +0100 |
---|---|---|
committer | Karel Zak | 2012-12-18 15:02:35 +0100 |
commit | cae29b3717dc08899faaa0adff818fe63a2c88b7 (patch) | |
tree | f02a16454ee861953c2132433c8db2c71f2f40ca /include | |
parent | include/list: add list_last_entry() (diff) | |
download | kernel-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')
-rw-r--r-- | include/consoles.h | 6 |
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); |