]> git.alsa-project.org Git - alsa-gobject.git/commit
rawmidi: stream_pair: report error about write-only file descriptor
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 16 Nov 2020 02:45:41 +0000 (11:45 +0900)
committer坂本 貴史 <o-takashi@sakamocchi.jp>
Mon, 16 Nov 2020 12:04:53 +0000 (21:04 +0900)
commit9dc1e2f9b675fd5c49bffda4cb658fb3ed554668
tree2130a7fe3ad66f2effed0fc020a1c95c999c5297
parent10396810c7c998b15c6c0781e849b4e77f976c29
rawmidi: stream_pair: report error about write-only file descriptor

In design of ALSA rawmidi interface, one character device can handle
operations for both capture and playback. Applications can indicate
usage of both or either by flags of open system call.

The libalsarawmidi library checks the flag by fcntl(2) system call to
create GSource for capture. When the file descriptor is not configured
for read, the call returns error.

This commit handles the error for local error reporting.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
src/rawmidi/alsarawmidi-enum-types.h
src/rawmidi/stream-pair.c