mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-12 02:16:17 +00:00
testdisplay: Remove deprecated GIO functions
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
5534cb1c75
commit
28032382bc
@ -684,7 +684,11 @@ static gboolean hotplug_event(GIOChannel *source, GIOCondition condition,
|
|||||||
struct stat s;
|
struct stat s;
|
||||||
const char *hotplug;
|
const char *hotplug;
|
||||||
|
|
||||||
g_io_channel_read(source, buf, 256, &count);
|
/* drain all pending events */
|
||||||
|
do {
|
||||||
|
count = read(g_io_channel_unix_get_fd(source),
|
||||||
|
buf, sizeof(buf));
|
||||||
|
} while (count > 0);
|
||||||
|
|
||||||
dev = udev_monitor_receive_device(uevent_monitor);
|
dev = udev_monitor_receive_device(uevent_monitor);
|
||||||
if (!dev)
|
if (!dev)
|
||||||
@ -710,9 +714,7 @@ static gboolean input_event(GIOChannel *source, GIOCondition condition,
|
|||||||
gchar buf[256];
|
gchar buf[256];
|
||||||
gsize count;
|
gsize count;
|
||||||
|
|
||||||
g_io_channel_read(source, buf, 255, &count);
|
count = read(g_io_channel_unix_get_fd(source), buf, sizeof(buf));
|
||||||
buf[count] = '\0';
|
|
||||||
|
|
||||||
if (buf[0] == 'q' && (count == 1 || buf[1] == '\n'))
|
if (buf[0] == 'q' && (count == 1 || buf[1] == '\n'))
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user