Changeset 2578127f4e1498bbe514cc8407fd575fb4865994

Show
Ignore:
Timestamp:
18/09/07 17:52:21 (1 year ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1190130741 +0000
git-parent:

[4ff9961862088bf74ca36f04ae3e34094ec9778f]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1190130741 +0000
Message:

Remove remaining strerror() calls from core - refs #1297

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/extras/libc.c

    r6ee1e19 r2578127  
    948948    { 
    949949        case -1: 
    950             msg_Err (p_object, "unable to fork (%s)", strerror (errno)); 
     950            msg_Err (p_object, "unable to fork (%m)"); 
    951951            close (fds[0]); 
    952952            close (fds[1]); 
  • src/interface/interaction.c

    r246f8b2 r2578127  
    3636#include <stdlib.h>                                      /* free(), strtol() */ 
    3737#include <stdio.h>                                                   /* FILE */ 
    38 #include <string.h>                                            /* strerror() */ 
     38#include <string.h> 
    3939 
    4040#include <vlc_interface.h> 
  • src/libvlc-common.c

    r5e10314 r2578127  
    4242#include <errno.h>                                                 /* ENOMEM */ 
    4343#include <stdio.h>                                              /* sprintf() */ 
    44 #include <string.h>                                            /* strerror() */ 
     44#include <string.h> 
    4545#include <stdlib.h>                                                /* free() */ 
    4646 
     
    375375            else 
    376376            { 
    377                 msg_Err( p_libvlc, "cannot open pid file for writing: %s (%s)", 
    378                          psz_pidfile, strerror(errno) ); 
     377                msg_Err( p_libvlc, "cannot open pid file for writing: %s (%m)", 
     378                         psz_pidfile ); 
    379379            } 
    380380        } 
     
    10361036            if( unlink( psz_pidfile ) == -1 ) 
    10371037            { 
    1038                 msg_Dbg( p_libvlc, "removing pid file %s: failed: %s", 
    1039                         psz_pidfile, strerror(errno) ); 
     1038                msg_Dbg( p_libvlc, "removing pid file %s: %m", 
     1039                        psz_pidfile ); 
    10401040            } 
    10411041        } 
     
    12111211 
    12121212    /* LibVLC wants all messages in UTF-8. 
    1213      * Unfortunately, we cannot ask UTF-8 for strerror(), strsignal() 
     1213     * Unfortunately, we cannot ask UTF-8 for strerror_r(), strsignal_r() 
    12141214     * and other functions that are not part of our text domain. 
    12151215     */ 
  • src/misc/image.c

    r49b5f2e r2578127  
    353353    if( !file ) 
    354354    { 
    355         msg_Err( p_image->p_parent, "%s: %s", psz_url, strerror( errno ) ); 
     355        msg_Err( p_image->p_parent, "%s: %m", psz_url ); 
    356356        return VLC_EGENERIC; 
    357357    } 
     
    371371 
    372372    if( err ) 
    373        msg_Err( p_image->p_parent, "%s: %s", psz_url, strerror( err ) ); 
     373    { 
     374       errno = err; 
     375       msg_Err( p_image->p_parent, "%s: %m", psz_url ); 
     376    } 
    374377 
    375378    return err ? VLC_EGENERIC : VLC_SUCCESS; 
  • src/modules/configuration.c

    r6144922 r2578127  
    800800    if( p_stream == NULL && errno != ENOENT ) 
    801801    { 
    802         msg_Err( p_obj, "cannot open config file (%s): %s", 
    803                  psz_filename, strerror(errno) ); 
     802        msg_Err( p_obj, "cannot open config file (%s): %m", 
     803                 psz_filename ); 
    804804 
    805805    } 
     
    989989                    long l = strtoi (psz_option_value); 
    990990                    if (errno) 
    991                         msg_Warn (p_this, "Integer value (%s) for %s: %s", 
    992                                   psz_option_value, psz_option_name, 
    993                                   strerror (errno)); 
     991                        msg_Warn (p_this, "Integer value (%s) for %s: %m", 
     992                                  psz_option_value, psz_option_name); 
    994993                    else 
    995994                        p_item->saved.i = p_item->value.i = (int)l; 
     
    10311030    if (ferror (file)) 
    10321031    { 
    1033         msg_Err (p_this, "error reading configuration: %s", strerror (errno)); 
     1032        msg_Err (p_this, "error reading configuration: %m"); 
    10341033        clearerr (file); 
    10351034    } 
     
    10701069            free( psz_parent ); 
    10711070        } 
    1072         msg_Err( p_this, "could not create %s (%s)", 
    1073                  psz_dirname, strerror(errno) ); 
     1071        msg_Err( p_this, "could not create %s: %m", psz_dirname ); 
    10741072        return -1; 
    10751073    } 
  • src/modules/modules.c

    r6ee1e19 r2578127  
    13711371                            psz_name, p_module->psz_filename, dlerror() ); 
    13721372#elif defined(HAVE_DL_SHL_LOAD) 
    1373         msg_Warn( p_module, "cannot find symbol \"%s\" in file `%s' (%s)", 
    1374                             psz_name, p_module->psz_filename, strerror(errno) ); 
     1373        msg_Warn( p_module, "cannot find symbol \"%s\" in file `%s' (%m)", 
     1374                            psz_name, p_module->psz_filename ); 
    13751375#else 
    13761376#   error "Something is wrong in modules.c" 
     
    15041504    if( handle == NULL ) 
    15051505    { 
    1506         msg_Warn( p_this, "cannot load module `%s' (%s)", 
    1507                           psz_file, strerror(errno) ); 
     1506        msg_Warn( p_this, "cannot load module `%s' (%m)", psz_file ); 
    15081507        return -1; 
    15091508    } 
  • src/playlist/loadsave.c

    re116212 r2578127  
    5656    if( !p_export->p_file ) 
    5757    { 
    58         msg_Err( p_playlist , "could not create playlist file %s" 
    59                  " (%s)", psz_filename, strerror(errno) ); 
     58        msg_Err( p_playlist , "could not create playlist file %s (%m)", 
     59                 psz_filename ); 
    6060        return VLC_EGENERIC; 
    6161    }