[MPlayer-dev-eng] patch against /dev/rtc problem wit devfs

Joey Parrish joey at nicewarrior.org
Thu Jul 22 23:41:16 CEST 2004


On Thu, Jul 22, 2004 at 10:32:08AM +0300, Alexander Buloichik wrote:
> Hi, All !
> 
> 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.

--Joey

-- 
"Living in the complex world of the future is somewhat
like having bees live in your head.  But, there they are."




More information about the MPlayer-dev-eng mailing list