[MPlayer-dev-eng] patch against /dev/rtc problem wit devfs
Diego Biurrun
diego at biurrun.de
Sun Aug 1 01:59:03 CEST 2004
Joey Parrish writes:
> On Thu, Jul 22, 2004 at 10:32:08AM +0300, Alexander Buloichik wrote:
> >
> > This is patch for bug #34.
>
> > --- mplayer.c 17 Jul 2004 12:47:12 -0000 1.763
> > +++ mplayer.c 22 Jul 2004 07:31:34 -0000
> > @@ -1097,7 +1097,11 @@
> > if(!nortc)
> > {
> > // seteuid(0); /* Can't hurt to try to get root here */
> > - if ((rtc_fd = open(rtc_device ? rtc_device : "/dev/rtc", O_RDONLY)) < 0)
> > + rtc_fd = open("/dev/rtc", O_RDONLY);
> > + if (rtc_fd < 0) {
> > + rtc_fd = open("/dev/misc/rtc", O_RDONLY);
> > + }
> > + if (rtc_fd < 0)
> > mp_msg(MSGT_CPLAYER, MSGL_WARN, "Failed to open %s: %s (it should be readable by the user.)\n",
> > rtc_device ? rtc_device : "/dev/rtc", strerror(errno));
> > else {
>
> I disagree with this. It ignores rtc_device.
> Also, the error message should display the correct string for which
> device was tried.
Absolutely. Besides, the problem can now be solved by adding
rtc-device=/dev/misc/rtc
to the config file.
Rejected.
Diego
More information about the MPlayer-dev-eng
mailing list