[MPlayer-dev-eng] [PATCH] Seems like O_RDWR in radio module is not needed
voroshil at gmail.com
voroshil at gmail.com
Sat Nov 4 20:17:08 CET 2006
Hi, all
I have tried to replace O_RDWR with O_RDONLY in
tuner device open function and saw that radio (setting frequency,
channel switching) still works fine.
So, if no objections, i suggest to apply attached patch to
avoid unneccesery requirenment of write access to radio device file.
Regards.
P.S. Thanks to Vladimir Kushnir for hint ;)
--
Vladimir Voroshilov mailto:voroshil at gmail.com
Omsk State University
JID: voroshil at jabber.ru
ICQ: 95587719
-------------- next part --------------
Index: stream_radio.c
===================================================================
--- stream_radio.c (revision 20670)
+++ stream_radio.c (working copy)
@@ -1010,7 +1010,7 @@
stream->close=close_s;
stream->fill_buffer=fill_buffer_s;
- priv->radio_fd = open(radio_param_device, O_RDWR);
+ priv->radio_fd = open(radio_param_device, O_RDONLY);
if (priv->radio_fd < 0) {
mp_msg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_UnableOpenDevice,
radio_param_device, strerror(errno));
More information about the MPlayer-dev-eng
mailing list