Changeset 552e595131c5f1d66eba8e3c22c2b1c509be5153

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

[7c7854e76cda10120edb95c9e3a8ab2345be2631]

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

Replace strerror() with %m (or Linux DVB: strerror_r) - refs #1297

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/access/directory.c

    r16e5180 r552e595  
    378378    if ((fd == -1) || fstat (fd, &stself.st)) 
    379379    { 
    380         msg_Err (p_playlist, "cannot stat `%s': %s", psz_name, 
    381                  strerror (errno)); 
     380        msg_Err (p_playlist, "cannot stat `%s': %m", psz_name); 
    382381        return VLC_EGENERIC; 
    383382    } 
     
    406405    if( i_dir_content == -1 ) 
    407406    { 
    408         msg_Err (p_playlist, "cannot read `%s': %s", psz_name, 
    409                  strerror (errno)); 
     407        msg_Err (p_playlist, "cannot read `%s': %m", psz_name); 
    410408        return VLC_EGENERIC; 
    411409    } 
     
    552550        int err = errno; 
    553551        if (err != ENOTDIR) 
    554             msg_Err (obj, "%s: %s", path, strerror (err)); 
     552            msg_Err (obj, "%s: %m", path); 
    555553        else 
    556554            msg_Dbg (obj, "skipping non-directory `%s'", path); 
  • modules/access/dv.c

    r6ee1e19 r552e595  
    470470    if ( !( handle = raw1394_new_handle() ) ) 
    471471    { 
    472         msg_Err( p_access, "raw1394 - failed to get handle: %s.\n", strerror( errno ) ); 
     472        msg_Err( p_access, "raw1394 - failed to get handle: %m." ); 
    473473        return VLC_EGENERIC; 
    474474    } 
     
    476476    if ( ( n_ports = raw1394_get_port_info( handle, pinf, 16 ) ) < 0 ) 
    477477    { 
    478         msg_Err( p_access, "raw1394 - failed to get port info: %s.\n", strerror( errno ) ); 
     478        msg_Err( p_access, "raw1394 - failed to get port info: %m.\n" ); 
    479479        raw1394_destroy_handle( handle ); 
    480480        return VLC_EGENERIC; 
     
    502502    if ( !handle ) 
    503503    { 
    504         msg_Err( p_access, "raw1394 - failed to get handle: %s.\n", strerror( errno ) ); 
     504        msg_Err( p_access, "raw1394 - failed to get handle: %m." ); 
    505505        return NULL; 
    506506    } 
     
    508508    if ( ( n_ports = raw1394_get_port_info( handle, pinf, 16 ) ) < 0 ) 
    509509    { 
    510         msg_Err( p_access, "raw1394 - failed to get port info: %s.\n", strerror( errno ) ); 
     510        msg_Err( p_access, "raw1394 - failed to get port info: %m." ); 
    511511        raw1394_destroy_handle( handle ); 
    512512        return NULL; 
     
    516516    if ( raw1394_set_port( handle, port ) < 0 ) 
    517517    { 
    518         msg_Err( p_access, "raw1394 - failed to set set port: %s.\n", strerror( errno ) ); 
     518        msg_Err( p_access, "raw1394 - failed to set set port: %m." ); 
    519519        return NULL; 
    520520    } 
  • modules/access/dvb/access.c

    r6ee1e19 r552e595  
    434434                continue; 
    435435 
    436             msg_Err( p_access, "poll error: %s", strerror(errno) ); 
     436            msg_Err( p_access, "poll error: %m" ); 
    437437            return NULL; 
    438438        } 
     
    493493                                p_sys->i_read_once * TS_PACKET_SIZE ) ) <= 0 ) 
    494494            { 
    495                 msg_Warn( p_access, "read failed (%s)", strerror(errno) ); 
     495                msg_Warn( p_access, "read failed (%m)" ); 
    496496                block_Release( p_block ); 
    497497                continue; 
  • modules/access/dvb/en50221.c

    r6ee1e19 r552e595  
    231231    if ( write( p_sys->i_ca_handle, p_data, i_size ) != i_size ) 
    232232    { 
    233         msg_Err( p_access, "cannot write to CAM device (%s)", 
    234                  strerror(errno) ); 
     233        msg_Err( p_access, "cannot write to CAM device (%m)" ); 
    235234        return VLC_EGENERIC; 
    236235    } 
     
    276275    if ( i_size < 5 ) 
    277276    { 
    278         msg_Err( p_access, "cannot read from CAM device (%d:%s)", i_size, 
    279                  strerror(errno) ); 
     277        msg_Err( p_access, "cannot read from CAM device (%d:%m)", i_size ); 
    280278        return VLC_EGENERIC; 
    281279    } 
     
    816814            if ( i_ret < 0 ) 
    817815            { 
    818                 msg_Err( p_access, "Error sending to CAM: %s", strerror(errno) ); 
     816                msg_Err( p_access, "Error sending to CAM: %m" ); 
    819817                i_ret = VLC_EGENERIC; 
    820818            } 
  • modules/access/dvb/linux_dvb.c

    r6ee1e19 r552e595  
    111111    if( (p_sys->i_frontend_handle = open(frontend, O_RDWR | O_NONBLOCK)) < 0 ) 
    112112    { 
    113         msg_Err( p_access, "FrontEndOpen: opening device failed (%s)", 
    114                  strerror(errno) ); 
     113        msg_Err( p_access, "FrontEndOpen: opening device failed (%m)" ); 
    115114        free( p_frontend ); 
    116115        return VLC_EGENERIC; 
     
    297296                return; /* no more events */ 
    298297 
    299             msg_Err( p_access, "reading frontend event failed (%d) %s", 
    300                      i_ret, strerror(errno) ); 
     298            msg_Err( p_access, "reading frontend event failed (%d): %m", 
     299                     i_ret ); 
    301300            return; 
    302301        } 
     
    380379                        &p_frontend->info )) < 0 ) 
    381380    { 
    382         p += sprintf( p, "ioctl FE_GET_INFO failed (%d) %s\n", i_ret, 
    383                       strerror(errno) ); 
     381        char buf[1000]; 
     382        strerror_r( errno, buf, sizeof( buf ) ); 
     383        p += sprintf( p, "ioctl FE_GET_INFO failed (%d) %s\n", i_ret, buf ); 
    384384        goto out; 
    385385    } 
     
    467467           < 0 ) 
    468468    { 
    469         p += sprintf( p, "</table>ioctl FE_READ_STATUS failed (%d) %s\n", i_ret, 
    470                       strerror(errno) ); 
     469        char buf[1000]; 
     470        strerror_r( errno, buf, sizeof( buf ) ); 
     471        p += sprintf( p, "</table>ioctl FE_READ_STATUS failed (%d) %s\n", 
     472                      i_ret, buf ); 
    471473        goto out; 
    472474    } 
     
    524526                        &p_frontend->info )) < 0 ) 
    525527    { 
    526         msg_Err( p_access, "ioctl FE_GET_INFO failed (%d) %s", i_ret, 
    527                  strerror(errno) ); 
     528        msg_Err( p_access, "ioctl FE_GET_INFO failed (%d): %m", i_ret ); 
    528529        return VLC_EGENERIC; 
    529530    } 
     
    808809    if( (i_err = ioctl( p_sys->i_frontend_handle, FE_SET_TONE, SEC_TONE_OFF )) < 0 ) 
    809810    { 
    810         msg_Err( p_access, "ioctl FE_SET_TONE failed, tone=%s (%d) %s", 
    811                  fe_tone == SEC_TONE_ON ? "on" : "off", i_err, 
    812                  strerror(errno) ); 
     811        msg_Err( p_access, "ioctl FE_SET_TONE failed, tone=%s (%d) %m", 
     812                 fe_tone == SEC_TONE_ON ? "on" : "off", i_err ); 
    813813        return i_err; 
    814814    } 
     
    817817    if( (i_err = ioctl( p_sys->i_frontend_handle, FE_SET_VOLTAGE, fe_voltage )) < 0 ) 
    818818    { 
    819         msg_Err( p_access, "ioctl FE_SET_VOLTAGE failed, voltage=%d (%d) %s", 
    820                  fe_voltage, i_err, strerror(errno) ); 
     819        msg_Err( p_access, "ioctl FE_SET_VOLTAGE failed, voltage=%d (%d) %m", 
     820                 fe_voltage, i_err ); 
    821821        return i_err; 
    822822    } 
     
    827827    { 
    828828        msg_Err( p_access, 
    829                  "ioctl FE_ENABLE_HIGH_LNB_VOLTAGE failed, val=%d (%d) %s", 
    830                  val.b_bool, i_err, strerror(errno) ); 
     829                 "ioctl FE_ENABLE_HIGH_LNB_VOLTAGE failed, val=%d (%d) %m", 
     830                 val.b_bool, i_err ); 
    831831    } 
    832832 
     
    855855                           &cmd.cmd )) < 0 ) 
    856856        { 
    857             msg_Err( p_access, "ioctl FE_SEND_MASTER_CMD failed (%d) %s", 
    858                      i_err, strerror(errno) ); 
     857            msg_Err( p_access, "ioctl FE_SEND_MASTER_CMD failed (%d) %m", 
     858                     i_err ); 
    859859            return i_err; 
    860860        } 
     
    866866                      ((val.i_int - 1) % 2) ? SEC_MINI_B : SEC_MINI_A )) < 0 ) 
    867867        { 
    868             msg_Err( p_access, "ioctl FE_SEND_BURST failed (%d) %s", 
    869                      i_err, strerror(errno) ); 
     868            msg_Err( p_access, "ioctl FE_SEND_BURST failed (%d) %m", 
     869                     i_err ); 
    870870            return i_err; 
    871871        } 
     
    876876    if( (i_err = ioctl( p_sys->i_frontend_handle, FE_SET_TONE, fe_tone )) < 0 ) 
    877877    { 
    878         msg_Err( p_access, "ioctl FE_SET_TONE failed, tone=%s (%d) %s", 
    879                  fe_tone == SEC_TONE_ON ? "on" : "off", i_err, 
    880                  strerror(errno) ); 
     878        msg_Err( p_access, "ioctl FE_SET_TONE failed, tone=%s (%d) %m", 
     879                 fe_tone == SEC_TONE_ON ? "on" : "off", i_err ); 
    881880        return i_err; 
    882881    } 
     
    991990    if( (i_ret = ioctl( p_sys->i_frontend_handle, FE_SET_FRONTEND, &fep )) < 0 ) 
    992991    { 
    993         msg_Err( p_access, "DVB-S: setting frontend failed (%d) %s", i_ret, 
    994                  strerror(errno) ); 
     992        msg_Err( p_access, "DVB-S: setting frontend failed (%d) %m", i_ret ); 
    995993        return VLC_EGENERIC; 
    996994    } 
     
    10361034    if( (i_ret = ioctl( p_sys->i_frontend_handle, FE_SET_FRONTEND, &fep )) < 0 ) 
    10371035    { 
    1038         msg_Err( p_access, "DVB-C: setting frontend failed (%d) %s", i_ret, 
    1039                  strerror(errno) ); 
     1036        msg_Err( p_access, "DVB-C: setting frontend failed (%d): %m", i_ret ); 
    10401037        return VLC_EGENERIC; 
    10411038    } 
     
    11721169    if( (ret = ioctl( p_sys->i_frontend_handle, FE_SET_FRONTEND, &fep )) < 0 ) 
    11731170    { 
    1174         msg_Err( p_access, "DVB-T: setting frontend failed (%d) %s", ret, 
    1175                  strerror(errno) ); 
     1171        msg_Err( p_access, "DVB-T: setting frontend failed (%d): %s", ret ); 
    11761172        return -1; 
    11771173    } 
     
    12091205    if( (i_ret = ioctl( p_sys->i_frontend_handle, FE_SET_FRONTEND, &fep )) < 0 ) 
    12101206    { 
    1211         msg_Err( p_access, "ATSC: setting frontend failed (%d) %s", i_ret, 
    1212                  strerror(errno) ); 
     1207        msg_Err( p_access, "ATSC: setting frontend failed (%d): %s", i_ret ); 
    12131208        return VLC_EGENERIC; 
    12141209    } 
     
    12481243    if( (*pi_fd = open(dmx, O_RDWR)) < 0 ) 
    12491244    { 
    1250         msg_Err( p_access, "DMXSetFilter: opening device failed (%s)", 
    1251                  strerror(errno) ); 
     1245        msg_Err( p_access, "DMXSetFilter: opening device failed (%m)" ); 
    12521246        return VLC_EGENERIC; 
    12531247    } 
     
    13551349    if( (i_ret = ioctl( *pi_fd, DMX_SET_PES_FILTER, &s_filter_params )) < 0 ) 
    13561350    { 
    1357         msg_Err( p_access, "DMXSetFilter: failed with %d (%s)", i_ret, 
    1358                  strerror(errno) ); 
     1351        msg_Err( p_access, "DMXSetFilter: failed with %d (%m)", i_ret ); 
    13591352        return VLC_EGENERIC; 
    13601353    } 
     
    13711364    if( (i_ret = ioctl( i_fd, DMX_STOP )) < 0 ) 
    13721365    { 
    1373         msg_Err( p_access, "DMX_STOP failed for demux (%d) %s", 
    1374                  i_ret, strerror(errno) ); 
     1366        msg_Err( p_access, "DMX_STOP failed for demux (%d): %m", i_ret ); 
    13751367        return i_ret; 
    13761368    } 
     
    14111403    if( (p_sys->i_handle = open(dvr, O_RDONLY)) < 0 ) 
    14121404    { 
    1413         msg_Err( p_access, "DVROpen: opening device failed (%s)", 
    1414                  strerror(errno) ); 
     1405        msg_Err( p_access, "DVROpen: opening device failed (%m)" ); 
    14151406        return VLC_EGENERIC; 
    14161407    } 
     
    14181409    if( fcntl( p_sys->i_handle, F_SETFL, O_NONBLOCK ) == -1 ) 
    14191410    { 
    1420         msg_Warn( p_access, "DVROpen: couldn't set non-blocking mode (%s)", 
    1421                   strerror(errno) ); 
     1411        msg_Warn( p_access, "DVROpen: couldn't set non-blocking mode (%m)" ); 
    14221412    } 
    14231413 
     
    14631453    if( (p_sys->i_ca_handle = open(ca, O_RDWR | O_NONBLOCK)) < 0 ) 
    14641454    { 
    1465         msg_Warn( p_access, "CAMInit: opening CAM device failed (%s)", 
    1466                   strerror(errno) ); 
     1455        msg_Warn( p_access, "CAMInit: opening CAM device failed (%m)" ); 
    14671456        p_sys->i_ca_handle = 0; 
    14681457        return VLC_EGENERIC; 
     
    16871676    if ( ioctl( p_sys->i_ca_handle, CA_GET_CAP, &caps ) != 0 ) 
    16881677    { 
    1689         p += sprintf( p, "ioctl CA_GET_CAP failed (%s)\n", 
    1690                       strerror(errno) ); 
     1678        char buf[1000]; 
     1679        strerror_r( errno, buf, sizeof( buf ) ); 
     1680        p += sprintf( p, "ioctl CA_GET_CAP failed (%s)\n", buf ); 
    16911681        goto out; 
    16921682    } 
     
    17291719        if ( ioctl( p_sys->i_ca_handle, CA_GET_SLOT_INFO, &sinfo ) != 0 ) 
    17301720        { 
    1731             p += sprintf( p, "ioctl CA_GET_SLOT_INFO failed (%s)<br>\n", 
    1732                           strerror(errno) ); 
     1721            char buf[1000]; 
     1722            strerror_r( errno, buf, sizeof( buf ) ); 
     1723            p += sprintf( p, "ioctl CA_GET_SLOT_INFO failed (%s)<br>\n", buf ); 
    17331724            continue; 
    17341725        } 
  • modules/access/file.c

    r6ee1e19 r552e595  
    169169    { 
    170170        if (fstat (fd, &st)) 
    171             msg_Err (p_access, "fstat(%d): %s", fd, strerror (errno)); 
     171            msg_Err (p_access, "fstat(%d): %m", fd); 
    172172        else 
    173173        if (S_ISDIR (st.st_mode)) 
     
    278278 
    279279            default: 
    280                 msg_Err (p_access, "read failed (%s)", strerror (errno)); 
     280                msg_Err (p_access, "read failed (%m)"); 
     281                /* FIXME: DO NOT USE strerror!!!! */ 
    281282                intf_UserFatal (p_access, VLC_FALSE, _("File reading failed"), 
    282283                                _("VLC could not read file \"%s\"."), 
     
    446447    if (fd == -1) 
    447448    { 
    448         msg_Err (p_access, "cannot open file %s (%s)", psz_name, 
    449                  strerror (errno)); 
     449        msg_Err (p_access, "cannot open file %s (%m)", psz_name); 
    450450        intf_UserFatal (p_access, VLC_FALSE, _("File reading failed"), 
    451451                        _("VLC could not open file \"%s\" (%s)."), 
  • modules/access/mms/mmstu.c

    r8917f56 r552e595  
    10431043    if( i_ret < 0 ) 
    10441044    { 
    1045         msg_Err( p_access, "network select error (%s)", strerror(errno) ); 
     1045        msg_Err( p_access, "network select error (%m)" ); 
    10461046        return -1; 
    10471047    } 
  • modules/access/pvr.c

    r81c5ac2 r552e595  
    832832    if( p_sys->i_fd < 0 ) 
    833833    { 
    834         msg_Err( p_access, "Cannot open device (%s).", strerror( errno ) ); 
     834        msg_Err( p_access, "Cannot open device (%m)." ); 
    835835        Close( VLC_OBJECT(p_access) ); 
    836836        return VLC_EGENERIC; 
     
    937937            if( p_sys->i_radio_fd < 0 ) 
    938938            { 
    939                 msg_Err( p_access, "Cannot open radio device (%s).", 
    940                          strerror( errno ) ); 
     939                msg_Err( p_access, "Cannot open radio device (%m)." ); 
    941940                Close( VLC_OBJECT(p_access) ); 
    942941                return VLC_EGENERIC; 
     
    955954        if ( result < 0 ) 
    956955        { 
    957             msg_Warn( p_access, "Failed to read tuner information (%s).", 
    958                       strerror( errno ) ); 
     956            msg_Warn( p_access, "Failed to read tuner information (%m)." ); 
    959957        } 
    960958        else 
     
    968966            if ( result < 0 ) 
    969967            { 
    970                 msg_Warn( p_access, "Failed to read tuner frequency (%s).", 
    971                           strerror( errno ) ); 
     968                msg_Warn( p_access, "Failed to read tuner frequency (%m)." ); 
    972969            } 
    973970            else 
     
    981978                if( result < 0 ) 
    982979                { 
    983                     msg_Warn( p_access, "Failed to set tuner frequency (%s).", 
    984                               strerror( errno ) ); 
     980                    msg_Warn( p_access, "Failed to set tuner frequency (%m)." ); 
    985981                } 
    986982                else 
     
    10911087    if( i_ret < 0 ) 
    10921088    { 
    1093         msg_Err( p_access, "Select error (%s).", strerror( errno ) ); 
     1089        msg_Err( p_access, "Polling error (%m)." ); 
    10941090        return -1; 
    10951091    } 
  • modules/access/smb.c

    r6ee1e19 r552e595  
    221221    if( !smbc_init_context( p_smb ) ) 
    222222    { 
    223         msg_Err( p_access, "cannot initialize context (%s)", strerror(errno) ); 
     223        msg_Err( p_access, "cannot initialize context (%m)" ); 
    224224        smbc_free_context( p_smb, 1 ); 
    225225        free( psz_uri ); 
     
    229229    if( !(p_file = (p_smb->open)( p_smb, psz_uri, O_RDONLY, 0 )) ) 
    230230    { 
    231         msg_Err( p_access, "open failed for '%s' (%s)", 
    232                  p_access->psz_path, strerror(errno) ); 
     231        msg_Err( p_access, "open failed for '%s' (%m)", 
     232                 p_access->psz_path ); 
    233233        smbc_free_context( p_smb, 1 ); 
    234234        free( psz_uri ); 
     
    240240 
    241241    i_ret = p_smb->fstat( p_smb, p_file, &filestat ); 
    242     if( i_ret ) msg_Err( p_access, "stat failed (%s)", strerror(errno) ); 
     242    if( i_ret ) msg_Err( p_access, "stat failed (%m)" ); 
    243243    else p_access->info.i_size = filestat.st_size; 
    244244#else 
     
    262262    if( (i_smb = smbc_open( psz_uri, O_RDONLY, 0 )) < 0 ) 
    263263    { 
    264         msg_Err( p_access, "open failed for '%s' (%s)", 
    265                  p_access->psz_path, strerror(errno) ); 
     264        msg_Err( p_access, "open failed for '%s' (%m)", 
     265                 p_access->psz_path ); 
    266266        free( psz_uri ); 
    267267        return VLC_EGENERIC; 
     
    272272 
    273273    i_ret = smbc_fstat( i_smb, &filestat ); 
    274     if( i_ret ) msg_Err( p_access, "stat failed (%s)", strerror(i_ret) ); 
     274    if( i_ret ) 
     275    { 
     276        errno = i_ret; 
     277        msg_Err( p_access, "stat failed (%m)" ); 
     278    } 
    275279    else p_access->info.i_size = filestat.st_size; 
    276280#endif 
     
    332336    if( i_ret == -1 ) 
    333337    { 
    334         msg_Err( p_access, "seek failed (%s)", strerror(errno) ); 
     338        msg_Err( p_access, "seek failed (%m)" ); 
    335339        return VLC_EGENERIC; 
    336340    } 
     
    359363    if( i_read < 0 ) 
    360364    { 
    361         msg_Err( p_access, "read failed (%s)", strerror(errno) ); 
     365        msg_Err( p_access, "read failed (%m)" ); 
    362366        return -1; 
    363367    } 
  • modules/access/v4l.c

    r6ee1e19 r552e595  
    879879    if( ( i_fd = open( psz_device, O_RDWR ) ) < 0 ) 
    880880    { 
    881         msg_Err( p_demux, "cannot open device (%s)", strerror( errno ) ); 
     881        msg_Err( p_demux, "cannot open device (%m)" ); 
    882882        goto vdev_failed; 
    883883    } 
     
    885885    if( ioctl( i_fd, VIDIOCGCAP, &p_sys->vid_cap ) < 0 ) 
    886886    { 
    887         msg_Err( p_demux, "cannot get capabilities (%s)", strerror( errno ) ); 
     887        msg_Err( p_demux, "cannot get capabilities (%m)" ); 
    888888        goto vdev_failed; 
    889889    } 
     
    930930    if( ioctl( i_fd, VIDIOCGCHAN, &vid_channel ) < 0 ) 
    931931    { 
    932         msg_Err( p_demux, "cannot get channel infos (%s)", 
    933                           strerror( errno ) ); 
     932        msg_Err( p_demux, "cannot get channel infos (%m)" ); 
    934933        goto vdev_failed; 
    935934    } 
     
    948947    if( ioctl( i_fd, VIDIOCSCHAN, &vid_channel ) < 0 ) 
    949948    { 
    950         msg_Err( p_demux, "cannot set channel (%s)", strerror( errno ) ); 
     949        msg_Err( p_demux, "cannot set channel (%m)" ); 
    951950        goto vdev_failed; 
    952951    } 
     
    963962            if( ioctl( i_fd, VIDIOCGTUNER, &vid_tuner ) < 0 ) 
    964963            { 
    965                 msg_Err( p_demux, "cannot get tuner (%s)", strerror( errno ) ); 
     964                msg_Err( p_demux, "cannot get tuner (%m)" ); 
    966965                goto vdev_failed; 
    967966            } 
     
    978977            if( ioctl( i_fd, VIDIOCSTUNER, &vid_tuner ) < 0 ) 
    979978            { 
    980                 msg_Err( p_demux, "cannot set tuner (%s)", strerror( errno ) ); 
     979                msg_Err( p_demux, "cannot set tuner (%m)" ); 
    981980                goto vdev_failed; 
    982981            } 
     
    994993            if( ioctl( i_fd, VIDIOCSFREQ, &driver_frequency ) < 0 ) 
    995994            { 
    996                 msg_Err( p_demux, "cannot set frequency (%s)", 
    997                                   strerror( errno ) ); 
     995                msg_Err( p_demux, "cannot set frequency (%m)" ); 
    998996                goto vdev_failed; 
    999997            } 
     
    10141012            if( ioctl( i_fd, VIDIOCGAUDIO, &vid_audio ) < 0 ) 
    10151013            { 
    1016                 msg_Err( p_demux, "cannot get audio (%s)", strerror( errno ) ); 
     1014                msg_Err( p_demux, "cannot get audio (%m)" ); 
    10171015                goto vdev_failed; 
    10181016            } 
     
    10231021            if( ioctl( i_fd, VIDIOCSAUDIO, &vid_audio ) < 0 ) 
    10241022            { 
    1025                 msg_Err( p_demux, "cannot set audio (%s)", strerror( errno ) ); 
     1023                msg_Err( p_demux, "cannot set audio (%m)" ); 
    10261024                goto vdev_failed; 
    10271025            } 
     
    10391037        if( ioctl( i_fd, MJPIOC_G_PARAMS, &mjpeg ) < 0 ) 
    10401038        { 
    1041             msg_Err( p_demux, "cannot get mjpeg params (%s)", 
    1042                               strerror( errno ) ); 
     1039            msg_Err( p_demux, "cannot get mjpeg params (%m)" ); 
    10431040            goto vdev_failed; 
    10441041        } 
     
    10901087        if( ioctl( i_fd, MJPIOC_S_PARAMS, &mjpeg ) < 0 ) 
    10911088        { 
    1092             msg_Err( p_demux, "cannot set mjpeg params (%s)", 
    1093                               strerror( errno ) ); 
     1089            msg_Err( p_demux, "cannot set mjpeg params (%m)" ); 
    10941090            goto vdev_failed; 
    10951091        } 
     
    11071103        if( ioctl( i_fd, VIDIOCGWIN, &vid_win ) < 0 ) 
    11081104        { 
    1109             msg_Err( p_demux, "cannot get win (%s)", strerror( errno ) ); 
     1105            msg_Err( p_demux, "cannot get win (%m)" ); 
    11101106            goto vdev_failed; 
    11111107        } 
     
    13371333    if( (i_fd = open( psz_device, O_RDONLY | O_NONBLOCK )) < 0 ) 
    13381334    { 
    1339         msg_Err( p_demux, "cannot open audio device (%s)", strerror( errno ) ); 
     1335        msg_Err( p_demux, "cannot open audio device (%m)" ); 
    13401336        goto adev_fail; 
    13411337    } 
     
    13461342    { 
    13471343        msg_Err( p_demux, "cannot set audio format (16b little endian) " 
    1348                  "(%s)", strerror( errno ) ); 
     1344                 "(%m)" ); 
    13491345        goto adev_fail; 
    13501346    } 
     
    13531349               &p_sys->b_stereo ) < 0 ) 
    13541350    { 
    1355         msg_Err( p_demux, "cannot set audio channels count (%s)", 
    1356                  strerror( errno ) ); 
     1351        msg_Err( p_demux, "cannot set audio channels count (%m)" ); 
    13571352        goto adev_fail; 
    13581353    } 
     
    13611356               &p_sys->i_sample_rate ) < 0 ) 
    13621357    { 
    1363         msg_Err( p_demux, "cannot set audio sample rate (%s)", 
    1364                  strerror( errno ) ); 
     1358        msg_Err( p_demux, "cannot set audio sample rate (%m)" ); 
    13651359        goto adev_fail; 
    13661360    } 
  • modules/access/v4l2.c

    r6ee1e19 r552e595  
    189189    if( ( i_fd = open( p_sys->psz_device, O_RDWR ) ) < 0 ) 
    190190    { 
    191         msg_Err( p_demux, "cannot open device (%s)", strerror( errno ) ); 
     191        msg_Err( p_demux, "cannot open device (%m)" ); 
    192192        goto open_failed; 
    193193    } 
     
    204204    if( ioctl( i_fd, VIDIOC_S_INPUT, &p_sys->i_selected_input ) < 0 ) 
    205205    { 
    206        msg_Err( p_demux, "cannot set input (%s)", strerror( errno ) ); 
     206       msg_Err( p_demux, "cannot set input (%m)" ); 
    207207       goto open_failed; 
    208208    } 
     
    218218        if( ioctl( i_fd, VIDIOC_REQBUFS, &reqbuf ) < 0 ) 
    219219        { 
    220             msg_Err( p_demux, "cannot initiate I/O operation (%s). " 
    221                     "Only MMAP is supported at the moment", strerror( errno ) ); 
     220            msg_Err( p_demux, "cannot initiate I/O operation (%m). " 
     221                    "Only MMAP is supported at the moment" ); 
    222222            goto open_failed; 
    223223        } 
     
    251251    if( ( i_fd = open( p_sys->psz_device, O_RDWR ) ) < 0 ) 
    252252    { 
    253         msg_Err( p_demux, "cannot open device (%s)", strerror( errno ) ); 
     253        msg_Err( p_demux, "cannot open device (%m)" ); 
    254254        goto open_failed; 
    255255    } 
     
    259259    if( ioctl( i_fd, VIDIOC_QUERYCAP, &p_sys->dev_cap ) < 0 ) 
    260260    { 
    261         msg_Err( p_demux, "cannot get capabilities (%s)", strerror( errno ) ); 
     261        msg_Err( p_demux, "cannot get capabilities (%m)" ); 
    262262        goto open_failed; 
    263263    } 
     
    306306            if( ioctl( i_fd, VIDIOC_ENUMINPUT, &p_sys->p_inputs[i_index] ) ) 
    307307            { 
    308                 msg_Err( p_demux, "cannot get video input characteristics (%s)", 
    309                                                  strerror( errno ) ); 
     308                msg_Err( p_demux, 
     309                         "cannot get video input characteristics (%m)" ); 
    310310                goto open_failed; 
    311311            } 
     
    335335            if( ioctl( i_fd, VIDIOC_G_AUDIO, &p_sys->p_audios[ p_sys->i_audio] ) < 0 ) 
    336336            { 
    337                 msg_Err( p_demux, "cannot get video input characteristics (%s)", 
    338                                                  strerror( errno ) ); 
     337                msg_Err( p_demux, 
     338                         "cannot get video input characteristics (%m)" ); 
    339339                goto open_failed; 
    340340            } 
     
    372372            if( ioctl( i_fd, VIDIOC_G_TUNER, &p_sys->p_tuners[i_index] ) ) 
    373373            { 
    374                 msg_Err( p_demux, "cannot get tuner characteristics (%s)", 
    375                                                  strerror( errno ) ); 
     374                msg_Err( p_demux, "cannot get tuner characteristics (%m)" ); 
    376375                goto open_failed; 
    377376            } 
     
    422421            if( ioctl( i_fd, VIDIOC_ENUM_FMT, &p_sys->p_codecs[i_index] ) < 0 ) 
    423422            { 
    424                 msg_Err( p_demux, "cannot get codec description (%s)", strerror( errno ) ); 
     423                msg_Err( p_demux, "cannot get codec description (%m)" ); 
    425424                goto open_failed; 
    426425            } 
  • modules/access_filter/dump.c

    r9e595c9 r552e595  
    112112    if ((p_sys->stream = tmpfile ()) == NULL) 
    113113    { 
    114         msg_Err (access, "cannot create temporary file: %s", strerror (errno)); 
     114        msg_Err (access, "cannot create temporary file: %m"); 
    115115        free (p_sys); 
    116116        return VLC_EGENERIC; 
     
    168168    if (fwrite (buffer, len, 1, stream) != 1) 
    169169    { 
    170         msg_Err (access, "cannot write to file: %s", strerror (errno)); 
     170        msg_Err (access, "cannot write to file: %m"); 
    171171        goto error; 
    172172    } 
     
    295295    if (newstream == NULL) 
    296296    { 
    297         msg_Err (access, "cannot create dump file \"%s\": %s", filename, 
    298                  strerror (errno)); 
     297        msg_Err (access, "cannot create dump file \"%s\": %m", filename); 
    299298        return; 
    300299    } 
     
    312311            if (ferror (oldstream)) 
    313312            { 
    314                 msg_Err (access, "cannot read temporary file: %s", 
    315                          strerror (errno)); 
     313                msg_Err (access, "cannot read temporary file: %m"); 
    316314                break; 
    317315            } 
     
    326324        if (fwrite (buf, len, 1, newstream) != 1) 
    327325        { 
    328             msg_Err (access, "cannot write dump file: %s", strerror (errno)); 
     326            msg_Err (access, "cannot write dump file: %m"); 
    329327            break; 
    330328        } 
  • modules/access_filter/record.c

    r16f32e1 r552e595  
    448448        if( p_sys->f == NULL ) 
    449449        { 
    450             msg_Err( p_access, "cannot open file '%s' (%s)", 
    451                      p_sys->psz_file, strerror(errno) ); 
     450            msg_Err( p_access, "cannot open file '%s' (%m)", 
     451                     p_sys->psz_file ); 
    452452            free( p_sys->psz_file ); 
    453453            p_sys->psz_file = NULL; 
  • modules/access_filter/timeshift.c

    r00aa3ff r552e595  
    423423        { 
    424424            /* We just can't work with less than 2 buffer files */ 
    425             msg_Err( p_access, "cannot open temporary file '%s' (%s)", 
    426                      p_sys->psz_filename, strerror(errno) ); 
     425            msg_Err( p_access, "cannot open temporary file '%s' (%m)", 
     426                     p_sys->psz_filename ); 
    427427            return VLC_EGENERIC; 
    428428        } 
  • modules/access_output/file.c

    re40d134 r552e595  
    139139        if( fd == -1 ) 
    140140        { 
    141             msg_Err( p_access, "cannot open `%s' (%s)", p_access->psz_path, 
    142                      strerror( errno ) ); 
     141            msg_Err( p_access, "cannot open `%s' (%m)", p_access->psz_path ); 
    143142            free( p_access->p_sys ); 
    144143            return( VLC_EGENERIC ); 
  • modules/access_output/udp.c

    rd568542 r552e595  
    466466    mtime_t              i_to_send = p_thread->i_group; 
    467467    int                  i_dropped_packets = 0; 
    468 #if defined(WIN32) || defined(UNDER_CE) 
    469     char strerror_buf[WINSOCK_STRERROR_SIZE]; 
    470 # define strerror( x ) winsock_strerror( strerror_buf ) 
    471 #endif 
    472468 
    473469    while( !p_thread->b_die ) 
     
    524520        if (val == -1) 
    525521        {