diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-11-23 00:10:38 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-11-23 00:10:38 +0200 |
commit | 9f10d3fb63200d66f236d696f95c335c7315ea6c (patch) | |
tree | 07d3411eb2ba5ba0d3348e79c6882511eb67860f | |
parent | 4120f32292090bd811165fe76780e4e74e3450b9 (diff) | |
download | micropython-9f10d3fb63200d66f236d696f95c335c7315ea6c.tar.gz micropython-9f10d3fb63200d66f236d696f95c335c7315ea6c.zip |
unix/main: Get rid of perror() which uses stdio.
-rw-r--r-- | unix/main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/unix/main.c b/unix/main.c index 741568f753..ae09b895d1 100644 --- a/unix/main.c +++ b/unix/main.c @@ -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; |