[vlc-commits] VDR: use vlc_strerror() and vlc_strerror_c()
Rémi Denis-Courmont
git at videolan.org
Sun Dec 29 15:16:29 CET 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Dec 28 19:58:06 2013 +0200| [8d8b50a49a2b65e05f1b918398c569a1b13e9e7f] | committer: Rémi Denis-Courmont
VDR: use vlc_strerror() and vlc_strerror_c()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8d8b50a49a2b65e05f1b918398c569a1b13e9e7f
---
modules/access/vdr.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/modules/access/vdr.c b/modules/access/vdr.c
index 05f4421..6ff3c46 100644
--- a/modules/access/vdr.c
+++ b/modules/access/vdr.c
@@ -368,9 +368,10 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len )
else
{
/* abort on read error */
- msg_Err( p_access, "failed to read (%m)" );
- dialog_Fatal( p_access, _("File reading failed"), "%s (%m)",
- _("VLC could not read the file.") );
+ msg_Err( p_access, "failed to read (%s)", vlc_strerror_c(errno) );
+ dialog_Fatal( p_access, _("File reading failed"),
+ _("VLC could not read the file (%s)."),
+ vlc_strerror(errno) );
SwitchFile( p_access, -1 );
return 0;
}
@@ -464,7 +465,8 @@ static bool ImportNextFile( access_t *p_access )
struct stat st;
if( vlc_stat( psz_path, &st ) )
{
- msg_Dbg( p_access, "could not stat %s: %m", psz_path );
+ msg_Dbg( p_access, "could not stat %s: %s", psz_path,
+ vlc_strerror_c(errno) );
free( psz_path );
return false;
}
@@ -514,7 +516,8 @@ static bool SwitchFile( access_t *p_access, unsigned i_file )
if( p_sys->fd == -1 )
{
- msg_Err( p_access, "Failed to open %s: %m", psz_path );
+ msg_Err( p_access, "Failed to open %s: %s", psz_path,
+ vlc_strerror_c(errno) );
goto error;
}
@@ -534,7 +537,7 @@ static bool SwitchFile( access_t *p_access, unsigned i_file )
error:
dialog_Fatal (p_access, _("File reading failed"), _("VLC could not"
- " open the file \"%s\". (%m)"), psz_path);
+ " open the file \"%s\" (%s)."), psz_path, vlc_strerror(errno) );
if( p_sys->fd != -1 )
{
close( p_sys->fd );
@@ -599,7 +602,8 @@ static FILE *OpenRelativeFile( access_t *p_access, const char *psz_file )
FILE *file = vlc_fopen( psz_path, "rb" );
if( !file )
- msg_Warn( p_access, "Failed to open %s: %m", psz_path );
+ msg_Warn( p_access, "Failed to open %s: %s", psz_path,
+ vlc_strerror_c(errno) );
free( psz_path );
return file;
More information about the vlc-commits
mailing list