From 9b7a12d90aa914db859044d0fd96369d7b9340c9 Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Mon, 3 Aug 2020 02:12:47 +0200 Subject: seat: Convert device list to linked list --- include/client.h | 3 ++- include/seat.h | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/client.h b/include/client.h index fb7574b..7d4a247 100644 --- a/include/client.h +++ b/include/client.h @@ -6,6 +6,7 @@ #include #include "connection.h" +#include "linked_list.h" #include "list.h" struct server; @@ -23,7 +24,7 @@ struct client { int seat_vt; bool pending_disable; - struct list devices; + struct linked_list devices; }; struct client *client_create(struct server *server, int client_fd); diff --git a/include/seat.h b/include/seat.h index d8fc7a8..c82f7a0 100644 --- a/include/seat.h +++ b/include/seat.h @@ -1,11 +1,13 @@ #ifndef _SEATD_SEAT_H #define _SEATD_SEAT_H -#include "list.h" #include #include #include +#include "linked_list.h" +#include "list.h" + struct client; enum seat_device_type { @@ -15,6 +17,7 @@ enum seat_device_type { }; struct seat_device { + struct linked_list link; // client::devices int device_id; int fd; int ref_cnt; -- cgit v1.2.3