unix/main: Get rid of perror() which uses stdio.

This commit is contained in:
Paul Sokolovsky 2015-11-23 00:10:38 +02:00
parent 4120f32292
commit 9f10d3fb63
1 changed files with 1 additions and 2 deletions

View File

@ -515,8 +515,7 @@ int main(int argc, char **argv) {
char *pathbuf = malloc(PATH_MAX);
char *basedir = realpath(argv[a], pathbuf);
if (basedir == NULL) {
mp_printf(&mp_stderr_print, "%s: can't open file '%s': [Errno %d] ", argv[0], argv[a], errno);
perror("");
mp_printf(&mp_stderr_print, "%s: can't open file '%s': [Errno %d] %s\n", argv[0], argv[a], errno, strerror(errno));
// CPython exits with 2 in such case
ret = 2;
break;