Changeset 2578127f4e1498bbe514cc8407fd575fb4865994
- 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
| r6ee1e19 |
r2578127 |
|
| 948 | 948 | { |
|---|
| 949 | 949 | case -1: |
|---|
| 950 | | msg_Err (p_object, "unable to fork (%s)", strerror (errno)); |
|---|
| | 950 | msg_Err (p_object, "unable to fork (%m)"); |
|---|
| 951 | 951 | close (fds[0]); |
|---|
| 952 | 952 | close (fds[1]); |
|---|
| r246f8b2 |
r2578127 |
|
| 36 | 36 | #include <stdlib.h> /* free(), strtol() */ |
|---|
| 37 | 37 | #include <stdio.h> /* FILE */ |
|---|
| 38 | | #include <string.h> /* strerror() */ |
|---|
| | 38 | #include <string.h> |
|---|
| 39 | 39 | |
|---|
| 40 | 40 | #include <vlc_interface.h> |
|---|
| r5e10314 |
r2578127 |
|
| 42 | 42 | #include <errno.h> /* ENOMEM */ |
|---|
| 43 | 43 | #include <stdio.h> /* sprintf() */ |
|---|
| 44 | | #include <string.h> /* strerror() */ |
|---|
| | 44 | #include <string.h> |
|---|
| 45 | 45 | #include <stdlib.h> /* free() */ |
|---|
| 46 | 46 | |
|---|
| … | … | |
| 375 | 375 | else |
|---|
| 376 | 376 | { |
|---|
| 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 ); |
|---|
| 379 | 379 | } |
|---|
| 380 | 380 | } |
|---|
| … | … | |
| 1036 | 1036 | if( unlink( psz_pidfile ) == -1 ) |
|---|
| 1037 | 1037 | { |
|---|
| 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 ); |
|---|
| 1040 | 1040 | } |
|---|
| 1041 | 1041 | } |
|---|
| … | … | |
| 1211 | 1211 | |
|---|
| 1212 | 1212 | /* 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() |
|---|
| 1214 | 1214 | * and other functions that are not part of our text domain. |
|---|
| 1215 | 1215 | */ |
|---|
| r49b5f2e |
r2578127 |
|
| 353 | 353 | if( !file ) |
|---|
| 354 | 354 | { |
|---|
| 355 | | msg_Err( p_image->p_parent, "%s: %s", psz_url, strerror( errno ) ); |
|---|
| | 355 | msg_Err( p_image->p_parent, "%s: %m", psz_url ); |
|---|
| 356 | 356 | return VLC_EGENERIC; |
|---|
| 357 | 357 | } |
|---|
| … | … | |
| 371 | 371 | |
|---|
| 372 | 372 | 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 | } |
|---|
| 374 | 377 | |
|---|
| 375 | 378 | return err ? VLC_EGENERIC : VLC_SUCCESS; |
|---|
| r6144922 |
r2578127 |
|
| 800 | 800 | if( p_stream == NULL && errno != ENOENT ) |
|---|
| 801 | 801 | { |
|---|
| 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 ); |
|---|
| 804 | 804 | |
|---|
| 805 | 805 | } |
|---|
| … | … | |
| 989 | 989 | long l = strtoi (psz_option_value); |
|---|
| 990 | 990 | 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); |
|---|
| 994 | 993 | else |
|---|
| 995 | 994 | p_item->saved.i = p_item->value.i = (int)l; |
|---|
| … | … | |
| 1031 | 1030 | if (ferror (file)) |
|---|
| 1032 | 1031 | { |
|---|
| 1033 | | msg_Err (p_this, "error reading configuration: %s", strerror (errno)); |
|---|
| | 1032 | msg_Err (p_this, "error reading configuration: %m"); |
|---|
| 1034 | 1033 | clearerr (file); |
|---|
| 1035 | 1034 | } |
|---|
| … | … | |
| 1070 | 1069 | free( psz_parent ); |
|---|
| 1071 | 1070 | } |
|---|
| 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 ); |
|---|
| 1074 | 1072 | return -1; |
|---|
| 1075 | 1073 | } |
|---|
| r6ee1e19 |
r2578127 |
|
| 1371 | 1371 | psz_name, p_module->psz_filename, dlerror() ); |
|---|
| 1372 | 1372 | #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 ); |
|---|
| 1375 | 1375 | #else |
|---|
| 1376 | 1376 | # error "Something is wrong in modules.c" |
|---|
| … | … | |
| 1504 | 1504 | if( handle == NULL ) |
|---|
| 1505 | 1505 | { |
|---|
| 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 ); |
|---|
| 1508 | 1507 | return -1; |
|---|
| 1509 | 1508 | } |
|---|
| re116212 |
r2578127 |
|
| 56 | 56 | if( !p_export->p_file ) |
|---|
| 57 | 57 | { |
|---|
| 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 ); |
|---|
| 60 | 60 | return VLC_EGENERIC; |
|---|
| 61 | 61 | } |
|---|