From cae29b3717dc08899faaa0adff818fe63a2c88b7 Mon Sep 17 00:00:00 2001 From: Werner Fink Date: Tue, 18 Dec 2012 15:02:35 +0100 Subject: 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 Signed-off-by: Karel Zak --- include/consoles.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/consoles.h') 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 * * 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 #include #include +#include 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); -- cgit v1.2.3-55-g7522