[vlc-commits] linsys: use vlc_strerror_c()
Rémi Denis-Courmont
git at videolan.org
Sun Dec 29 15:16:27 CET 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Dec 28 19:48:46 2013 +0200| [d0dd8a45383ba1affa8023e1b4955cca9d48d78a] | committer: Rémi Denis-Courmont
linsys: use vlc_strerror_c()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d0dd8a45383ba1affa8023e1b4955cca9d48d78a
---
modules/access/linsys/linsys_hdsdi.c | 41 +++++++++++++++++++++-------------
modules/access/linsys/linsys_sdi.c | 14 +++++++-----
2 files changed, 35 insertions(+), 20 deletions(-)
diff --git a/modules/access/linsys/linsys_hdsdi.c b/modules/access/linsys/linsys_hdsdi.c
index e140b7f..457da3c 100644
--- a/modules/access/linsys/linsys_hdsdi.c
+++ b/modules/access/linsys/linsys_hdsdi.c
@@ -678,7 +678,7 @@ static int InitCapture( demux_t *p_demux )
if ( poll( pfd, 1, READ_TIMEOUT ) < 0 )
{
- msg_Warn( p_demux, "couldn't poll(): %m" );
+ msg_Warn( p_demux, "couldn't poll(): %s", vlc_strerror_c(errno) );
close( p_sys->i_vfd );
return VLC_EGENERIC;
}
@@ -688,7 +688,8 @@ static int InitCapture( demux_t *p_demux )
unsigned int i_val;
if ( ioctl( p_sys->i_vfd, SDIVIDEO_IOC_RXGETEVENTS, &i_val ) < 0 )
- msg_Warn( p_demux, "couldn't SDIVIDEO_IOC_RXGETEVENTS %m" );
+ msg_Warn( p_demux, "couldn't SDIVIDEO_IOC_RXGETEVENTS: %s",
+ vlc_strerror_c(errno) );
else
{
if ( i_val & SDIVIDEO_EVENT_RX_BUFFER )
@@ -716,7 +717,8 @@ static int InitCapture( demux_t *p_demux )
if ( ioctl( p_sys->i_vfd, SDIVIDEO_IOC_RXGETVIDSTATUS, &p_sys->i_standard )
< 0 )
{
- msg_Warn( p_demux, "couldn't SDIVIDEO_IOC_RXGETVIDSTATUS %m" );
+ msg_Warn( p_demux, "couldn't SDIVIDEO_IOC_RXGETVIDSTATUS: %s",
+ vlc_strerror_c(errno) );
close( p_sys->i_vfd );
return VLC_EGENERIC;
}
@@ -742,7 +744,8 @@ static int InitCapture( demux_t *p_demux )
if ( ioctl( p_sys->i_afd, SDIAUDIO_IOC_RXGETAUDRATE, &i_rate ) < 0 )
{
- msg_Warn( p_demux, "couldn't SDIAUDIO_IOC_RXGETAUDRATE %m" );
+ msg_Warn( p_demux, "couldn't SDIAUDIO_IOC_RXGETAUDRATE: %s",
+ vlc_strerror_c(errno) );
return VLC_EGENERIC;
}
switch ( i_rate )
@@ -830,7 +833,8 @@ static int InitCapture( demux_t *p_demux )
PROT_READ, MAP_SHARED, p_sys->i_afd,
i * i_bufmemsize )) == MAP_FAILED )
{
- msg_Err( p_demux, "couldn't mmap(%d): %m", i );
+ msg_Err( p_demux, "couldn't mmap(%d): %s", i,
+ vlc_strerror_c(errno) );
return VLC_EGENERIC;
}
}
@@ -884,7 +888,8 @@ static int InitCapture( demux_t *p_demux )
PROT_READ, MAP_SHARED, p_sys->i_vfd,
i * i_bufmemsize )) == MAP_FAILED )
{
- msg_Err( p_demux, "couldn't mmap(%d): %m", i );
+ msg_Err( p_demux, "couldn't mmap(%d): %s", i,
+ vlc_strerror_c(errno) );
return VLC_EGENERIC;
}
}
@@ -930,7 +935,7 @@ static int Capture( demux_t *p_demux )
if ( poll( pfd, 1 + (p_sys->i_max_channel != -1), READ_TIMEOUT ) < 0 )
{
- msg_Warn( p_demux, "couldn't poll(): %m" );
+ msg_Warn( p_demux, "couldn't poll(): %s", vlc_strerror_c(errno) );
return VLC_EGENERIC;
}
@@ -939,7 +944,8 @@ static int Capture( demux_t *p_demux )
unsigned int i_val;
if ( ioctl( p_sys->i_vfd, SDIVIDEO_IOC_RXGETEVENTS, &i_val ) < 0 )
- msg_Warn( p_demux, "couldn't SDIVIDEO_IOC_RXGETEVENTS %m" );
+ msg_Warn( p_demux, "couldn't SDIVIDEO_IOC_RXGETEVENTS: %s",
+ vlc_strerror_c(errno) );
else
{
if ( i_val & SDIVIDEO_EVENT_RX_BUFFER )
@@ -963,7 +969,8 @@ static int Capture( demux_t *p_demux )
unsigned int i_val;
if ( ioctl( p_sys->i_afd, SDIAUDIO_IOC_RXGETEVENTS, &i_val ) < 0 )
- msg_Warn( p_demux, "couldn't SDIAUDIO_IOC_RXGETEVENTS %m" );
+ msg_Warn( p_demux, "couldn't SDIAUDIO_IOC_RXGETEVENTS: %s",
+ vlc_strerror_c(errno) );
else
{
if ( i_val & SDIAUDIO_EVENT_RX_BUFFER )
@@ -986,7 +993,8 @@ static int Capture( demux_t *p_demux )
if ( ioctl( p_sys->i_vfd, SDIVIDEO_IOC_DQBUF, p_sys->i_current_vbuffer )
< 0 )
{
- msg_Warn( p_demux, "couldn't SDIVIDEO_IOC_DQBUF %m" );
+ msg_Warn( p_demux, "couldn't SDIVIDEO_IOC_DQBUF: %s",
+ vlc_strerror_c(errno) );
return VLC_EGENERIC;
}
@@ -996,7 +1004,8 @@ static int Capture( demux_t *p_demux )
if ( ioctl( p_sys->i_vfd, SDIVIDEO_IOC_QBUF, p_sys->i_current_vbuffer )
< 0 )
{
- msg_Warn( p_demux, "couldn't SDIVIDEO_IOC_QBUF %m" );
+ msg_Warn( p_demux, "couldn't SDIVIDEO_IOC_QBUF: %s",
+ vlc_strerror_c(errno) );
return VLC_EGENERIC;
}
@@ -1009,7 +1018,7 @@ static int Capture( demux_t *p_demux )
if ( read( p_sys->i_vfd, p_buffer, p_sys->i_vbuffer_size ) < 0 )
{
- msg_Warn( p_demux, "couldn't read %m" );
+ msg_Warn( p_demux, "couldn't read: %s", vlc_strerror_c(errno) );
free( p_buffer );
return VLC_EGENERIC;
}
@@ -1029,7 +1038,8 @@ static int Capture( demux_t *p_demux )
if ( ioctl( p_sys->i_afd, SDIAUDIO_IOC_DQBUF, p_sys->i_current_abuffer )
< 0 )
{
- msg_Warn( p_demux, "couldn't SDIAUDIO_IOC_DQBUF %m" );
+ msg_Warn( p_demux, "couldn't SDIAUDIO_IOC_DQBUF: %s",
+ vlc_strerror_c(errno) );
return VLC_EGENERIC;
}
@@ -1039,7 +1049,8 @@ static int Capture( demux_t *p_demux )
if ( ioctl( p_sys->i_afd, SDIAUDIO_IOC_QBUF, p_sys->i_current_abuffer )
< 0 )
{
- msg_Warn( p_demux, "couldn't SDIAUDIO_IOC_QBUF %m" );
+ msg_Warn( p_demux, "couldn't SDIAUDIO_IOC_QBUF: %s",
+ vlc_strerror_c(errno) );
return VLC_EGENERIC;
}
@@ -1052,7 +1063,7 @@ static int Capture( demux_t *p_demux )
if ( read( p_sys->i_afd, p_buffer, p_sys->i_abuffer_size ) < 0 )
{
- msg_Warn( p_demux, "couldn't read %m" );
+ msg_Warn( p_demux, "couldn't read: %s", vlc_strerror_c(errno) );
free( p_buffer );
return VLC_EGENERIC;
}
diff --git a/modules/access/linsys/linsys_sdi.c b/modules/access/linsys/linsys_sdi.c
index 059614d..e77759f 100644
--- a/modules/access/linsys/linsys_sdi.c
+++ b/modules/access/linsys/linsys_sdi.c
@@ -1759,7 +1759,8 @@ static int InitCapture( demux_t *p_demux )
PROT_READ, MAP_SHARED, p_sys->i_fd,
i * i_bufmemsize )) == MAP_FAILED )
{
- msg_Err( p_demux, "couldn't mmap(%d): %m", i );
+ msg_Err( p_demux, "couldn't mmap(%d): %s", i,
+ vlc_strerror_c(errno) );
free( p_sys->pp_buffers );
return VLC_EGENERIC;
}
@@ -1789,7 +1790,7 @@ static int Capture( demux_t *p_demux )
if ( poll( &pfd, 1, READ_TIMEOUT ) < 0 )
{
- msg_Warn( p_demux, "couldn't poll(): %m" );
+ msg_Warn( p_demux, "couldn't poll(): %s", vlc_strerror_c(errno) );
return VLC_EGENERIC;
}
@@ -1798,7 +1799,8 @@ static int Capture( demux_t *p_demux )
unsigned int i_val;
if ( ioctl( p_sys->i_fd, SDI_IOC_RXGETEVENTS, &i_val ) < 0 )
- msg_Warn( p_demux, "couldn't SDI_IOC_RXGETEVENTS %m" );
+ msg_Warn( p_demux, "couldn't SDI_IOC_RXGETEVENTS: %s",
+ vlc_strerror_c(errno) );
else
{
if ( i_val & SDI_EVENT_RX_BUFFER )
@@ -1818,7 +1820,8 @@ static int Capture( demux_t *p_demux )
if ( ioctl( p_sys->i_fd, SDI_IOC_DQBUF, p_sys->i_current_buffer ) < 0 )
{
- msg_Warn( p_demux, "couldn't SDI_IOC_DQBUF %m" );
+ msg_Warn( p_demux, "couldn't SDI_IOC_DQBUF: %s",
+ vlc_strerror_c(errno) );
return VLC_EGENERIC;
}
@@ -1828,7 +1831,8 @@ static int Capture( demux_t *p_demux )
if ( ioctl( p_sys->i_fd, SDI_IOC_QBUF, p_sys->i_current_buffer ) < 0 )
{
- msg_Warn( p_demux, "couldn't SDI_IOC_QBUF %m" );
+ msg_Warn( p_demux, "couldn't SDI_IOC_QBUF: %s",
+ vlc_strerror_c(errno) );
return VLC_EGENERIC;
}
More information about the vlc-commits
mailing list