Commit b19adbaf authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

strerror(errno) is not thread-safe, use %m

parent e974af6d
......@@ -1062,7 +1062,7 @@ static int OpenDisplay( intf_thread_t *p_intf )
p_sys->i_fd = open( psz_device, O_RDWR );
if( p_sys->i_fd == -1 )
{
msg_Err( p_intf, "cannot open %s (%s)", psz_device, strerror(errno) );
msg_Err( p_intf, "cannot open %s (%m)", psz_device );
free( psz_device );
return VLC_EGENERIC;
}
......@@ -1071,7 +1071,7 @@ static int OpenDisplay( intf_thread_t *p_intf )
/* Get framebuffer device information */
if( ioctl( p_sys->i_fd, FBIOGET_VSCREENINFO, &p_sys->var_info ) )
{
msg_Err( p_intf, "cannot get fb info (%s)", strerror(errno) );
msg_Err( p_intf, "cannot get fb info (%m)" );
close( p_sys->i_fd );
return VLC_EGENERIC;
}
......
......@@ -173,8 +173,8 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
p_sys->i_inputfd = open( p_sys->psz_inputfile, O_RDONLY | O_NONBLOCK );
if( p_sys->i_inputfd == -1 )
{
msg_Warn( p_filter, "Failed to grab input file: %s (%s)",
p_sys->psz_inputfile, strerror( errno ) );
msg_Warn( p_filter, "Failed to grab input file: %s (%m)",
p_sys->psz_inputfile );
}
else
{
......@@ -191,8 +191,8 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
{
if( errno != ENXIO )
{
msg_Warn( p_filter, "Failed to grab output file: %s (%s)",
p_sys->psz_outputfile, strerror( errno ) );
msg_Warn( p_filter, "Failed to grab output file: %s (%m)",
p_sys->psz_outputfile );
}
}
else
......@@ -213,8 +213,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
/* We hit an error */
if( errno != EAGAIN )
{
msg_Warn( p_filter, "Error on input file: %s",
strerror( errno ) );
msg_Warn( p_filter, "Error on input file: %m" );
close( p_sys->i_inputfd );
p_sys->i_inputfd = -1;
}
......@@ -321,8 +320,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
/* We hit an error */
if( errno != EAGAIN )
{
msg_Warn( p_filter, "Error on output file: %s",
strerror( errno ) );
msg_Warn( p_filter, "Error on output file: %m" );
close( p_sys->i_outputfd );
p_sys->i_outputfd = -1;
}
......
......@@ -478,13 +478,13 @@ static int OpenDisplay( vout_thread_t *p_vout )
if( ioctl( p_sys->i_fd, FBIOGET_VSCREENINFO, &p_sys->fb_vinfo ) )
{
msg_Err( p_vout, "Can't get VSCREENINFO: %s", strerror(errno) );
msg_Err( p_vout, "Can't get VSCREENINFO: %m" );
close( p_sys->i_fd );
return VLC_EGENERIC;
}
if( ioctl( p_sys->i_fd, FBIOGET_FSCREENINFO, &p_sys->fb_finfo ) )
{
msg_Err( p_vout, "Can't get FSCREENINFO: %s", strerror(errno) );
msg_Err( p_vout, "Can't get FSCREENINFO: %m" );
close( p_sys->i_fd );
return VLC_EGENERIC;
}
......@@ -496,7 +496,7 @@ static int OpenDisplay( vout_thread_t *p_vout )
if( (p_sys->p_video = (uint8_t *)mmap( 0, p_sys->i_page_size, PROT_READ | PROT_WRITE, MAP_SHARED,
p_sys->i_fd, 0 )) == MAP_FAILED )
{
msg_Err( p_vout, "Can't mmap: %s", strerror(errno) );
msg_Err( p_vout, "Can't mmap: %m" );
close( p_sys->i_fd );
return VLC_EGENERIC;
}
......@@ -516,7 +516,7 @@ static int OpenDisplay( vout_thread_t *p_vout )
if( (p_sys->p_null = (uint8_t *)mmap( 0, p_sys->i_page_size, PROT_READ | PROT_WRITE,
MAP_PRIVATE, p_sys->i_null_fd, 0 )) == MAP_FAILED )
{
msg_Err( p_vout, "Can't mmap 2: %s", strerror(errno) );
msg_Err( p_vout, "Can't mmap 2: %m" );
munmap( p_sys->p_video, p_sys->i_page_size );
close( p_sys->i_null_fd );
close( p_sys->i_fd );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment