diff options
author | Kenny Levinsen <kl@kl.wtf> | 2022-03-29 10:41:16 +0200 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2022-03-29 10:54:27 +0200 |
commit | 0462e9331d1648171bd47e62a2808f0a4d647239 (patch) | |
tree | 2d91785d72da23c25fa4146fab09580f7e2d9375 /seatd/seat.c | |
parent | 684dd619455011bc08c85ae4c1b39394268b5646 (diff) |
wscons: Move to its own device type
This reduces ifdefs and avoids overloading evdev as something it is not.
Diffstat (limited to 'seatd/seat.c')
-rw-r--r-- | seatd/seat.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/seatd/seat.c b/seatd/seat.c index 354273f..7a66a20 100644 --- a/seatd/seat.c +++ b/seatd/seat.c @@ -17,6 +17,7 @@ #include "protocol.h" #include "seat.h" #include "terminal.h" +#include "wscons.h" static int seat_close_client(struct client *client); static int vt_close(int vt); @@ -235,6 +236,8 @@ struct seat_device *seat_open_device(struct client *client, const char *path) { type = SEAT_DEVICE_TYPE_EVDEV; } else if (path_is_drm(sanitized_path)) { type = SEAT_DEVICE_TYPE_DRM; + } else if (path_is_wscons(sanitized_path)) { + type = SEAT_DEVICE_TYPE_WSCONS; } else { log_errorf("%s is not a supported device type ", sanitized_path); errno = ENOENT; @@ -281,6 +284,9 @@ struct seat_device *seat_open_device(struct client *client, const char *path) { case SEAT_DEVICE_TYPE_EVDEV: // Nothing to do here break; + case SEAT_DEVICE_TYPE_WSCONS: + // Nothing to do here + break; default: log_error("Invalid seat device type"); abort(); @@ -333,6 +339,9 @@ static int seat_deactivate_device(struct seat_device *seat_device) { return -1; } break; + case SEAT_DEVICE_TYPE_WSCONS: + // Nothing to do here + break; default: log_error("Invalid seat device type"); abort(); @@ -382,6 +391,9 @@ static int seat_activate_device(struct client *client, struct seat_device *seat_ case SEAT_DEVICE_TYPE_EVDEV: errno = EINVAL; return -1; + case SEAT_DEVICE_TYPE_WSCONS: + // Nothing to do here + break; default: log_error("Invalid seat device type"); abort(); |