Commit 12de60a5 authored by Jesse Barnes's avatar Jesse Barnes

testdisplay: don't read hotplug events from buffer before libudev

Otherwise we'll just block rather than trying to update the display.
Signed-off-by: Jesse Barnes's avatarJesse Barnes <>
parent b11d67a3
......@@ -750,19 +750,11 @@ static void usage(char *name)
static gboolean hotplug_event(GIOChannel *source, GIOCondition condition,
gpointer data)
gchar buf[256];
gsize count;
struct udev_device *dev;
dev_t udev_devnum;
struct stat s;
const char *hotplug;
/* 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);
if (!dev)
goto out;
Markdown is supported
0% or
Finish editing this message first!
Please register or to comment