Re: [PATCH 4/4] modules/access/vcd/cdrom.c: ifdef some ioctls. Fix cdda enable on GNU/Hurd.
Gabriele Giacone, le Tue 18 Feb 2014 23:06:51 +0100, a écrit :
> ---
> modules/access/vcd/cdrom.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
Again, that's deemed to produce horrible results. Just try to think at
the consequence of not doing these ioctls...
> diff --git a/modules/access/vcd/cdrom.c b/modules/access/vcd/cdrom.c
> index e536315..81336b1 100644
> --- a/modules/access/vcd/cdrom.c
> +++ b/modules/access/vcd/cdrom.c
> @@ -77,6 +77,9 @@
> #elif defined (__linux__)
> # include <sys/ioctl.h>
> # include <linux/cdrom.h>
> +#elif defined (__GNU__)
> +# include <sys/ioctl.h>
> +# include <sys/cdrom.h>
> #elif defined( __OS2__ )
> # include <os2.h>
> #else
> @@ -665,6 +668,7 @@ int ioctl_ReadSectors( vlc_object_t *p_this, const vcddev_t *p_vcddev,
> p_msf->frame = ( i_dummy % (CD_FRAMES * CD_SECS) ) % CD_FRAMES;
> #undef p_msf
>
> +#ifndef __GNU__
> if( ioctl( p_vcddev->i_device_handle, CDROMREADRAW,
> p_block + i * VCD_SECTOR_SIZE ) == -1 )
> {
> @@ -676,6 +680,7 @@ int ioctl_ReadSectors( vlc_object_t *p_this, const vcddev_t *p_vcddev,
> else
> break;
> }
> +#endif
> }
> #endif
> }
> @@ -1279,8 +1284,10 @@ static int CdTextRead( vlc_object_t *p_object, const vcddev_t *p_vcddev,
> gc.data_direction = CGC_DATA_READ;
> gc.timeout = 1000;
>
> +#ifndef __GNU__
> if( ioctl( p_vcddev->i_device_handle, CDROM_SEND_PACKET, &gc ) == -1 )
> return VLC_EGENERIC;
> +#endif
>
> /* If the size is less than 4 it is an error, if it 4 then
> * it means no text data */
> @@ -1305,11 +1312,13 @@ static int CdTextRead( vlc_object_t *p_object, const vcddev_t *p_vcddev,
> gc.data_direction = CGC_DATA_READ;
> gc.timeout = 1000;
>
> +#ifndef __GNU__
> if( ioctl( p_vcddev->i_device_handle, CDROM_SEND_PACKET, &gc ) == -1 )
> {
> free( p_text );
> return VLC_EGENERIC;
> }
> +#endif
>
> /* */
> *pp_buffer = p_text;
> --
> 1.9.0.rc3
>
>
> --
> To UNSUBSCRIBE, email to debian-hurd-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: [🔎] 1bee58e6635b25c696a882c932babb41e80d5c31.1392651739.git.1o5g4r8o@gmail.com">http://lists.debian.org/[🔎] 1bee58e6635b25c696a882c932babb41e80d5c31.1392651739.git.1o5g4r8o@gmail.com
>
--
Samuel
<T> l'autre jour j'ai eu un type qu'est venu me demander « J'ai installé le
logiciel comme indiqué sur le site. Puis quand je le lance ça plante et ça me
marque “Voulez-vous envoyez un rapport d'erreur ?”. Je fais quoi ?! »
-+- ... -+-
Reply to: