summaryrefslogtreecommitdiff
path: root/tests/testdisplay.c
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2011-05-04 14:55:32 -0700
committerJesse Barnes <jbarnes@virtuousgeek.org>2011-05-04 14:57:06 -0700
commit12de60a5e8db990c173b21857fe68ff74daa5679 (patch)
tree57be69fba284586aedcb5c31b6eb10e1cea18623 /tests/testdisplay.c
parentb11d67a33baca467bebd53bf605bdeeee1f31e26 (diff)
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 <jbarnes@virtuousgeek.org>
Diffstat (limited to 'tests/testdisplay.c')
-rw-r--r--tests/testdisplay.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/tests/testdisplay.c b/tests/testdisplay.c
index 48684e1..8f3b89a 100644
--- a/tests/testdisplay.c
+++ b/tests/testdisplay.c
@@ -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;