Bug 89798 - Cannot read events in non-blocking mode
Summary: Cannot read events in non-blocking mode
Status: RESOLVED FIXED
Alias: None
Product: libevdev
Classification: Unclassified
Component: Core (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Peter Hutterer
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-27 21:34 UTC by g494074
Modified: 2016-03-02 04:20 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description g494074 2015-03-27 21:34:11 UTC
When trying to execute `libevdev_next_event(dev, LIBEVDEV_READ_FLAG_BLOCKING, &ev)`, the function call fails and prints the following error message:

libevdev error in libevdev_next_event: BUG: invalid flags 0x8

The problem is in line 999 of libevdev.c, which reads

	if (!(flags & (LIBEVDEV_READ_FLAG_NORMAL|LIBEVDEV_READ_FLAG_SYNC|LIBEVDEV_READ_FLAG_FORCE_SYNC))) {

when it should say

	if (!(flags & (LIBEVDEV_READ_FLAG_NORMAL|LIBEVDEV_READ_FLAG_SYNC|LIBEVDEV_READ_FLAG_FORCE_SYNC|LIBEVDEV_READ_FLAG_BLOCKING))) {
Comment 2 Peter Hutterer 2016-03-02 04:20:31 UTC
commit 97da13c3c4441b7ed7851dd215015998ad93320e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Apr 7 07:12:01 2015 +1000

    Accept LIBEVDEV_READ_FLAG_BLOCKING as valid flag


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.