Only print errno when failure caused by syscall. Adapt test cases. --HG-- branch : HEAD
diff --git a/regress/open_cons_extrabytes.test b/regress/open_cons_extrabytes.test index e8b1543..8fdf2cc 100644 --- a/regress/open_cons_extrabytes.test +++ b/regress/open_cons_extrabytes.test
@@ -3,4 +3,4 @@ file testextrabytes.zip testextrabytes.zip testextrabytes.zip args -c testextrabytes.zip return 1 -stdout opening `testextrabytes.zip' returned error 21/2 +stdout opening `testextrabytes.zip' returned error 21
diff --git a/regress/open_new_but_exists.test b/regress/open_new_but_exists.test index 612c8c9..9fb0460 100644 --- a/regress/open_new_but_exists.test +++ b/regress/open_new_but_exists.test
@@ -3,4 +3,4 @@ args -e test.zip return 1 file test.zip test.zip test.zip -stdout opening `test.zip' returned error 10/0 +stdout opening `test.zip' returned error 10
diff --git a/regress/open_nonarchive.test b/regress/open_nonarchive.test index 3bed520..979a26e 100644 --- a/regress/open_nonarchive.test +++ b/regress/open_nonarchive.test
@@ -3,4 +3,4 @@ file Makefile.am Makefile.am Makefile.am args Makefile.am return 1 -stdout opening `Makefile.am' returned error 19/0 +stdout opening `Makefile.am' returned error 19
diff --git a/regress/tryopen.c b/regress/tryopen.c index fcc280f..5997c4a 100644 --- a/regress/tryopen.c +++ b/regress/tryopen.c
@@ -90,7 +90,9 @@ return 0; } - printf("opening `%s' returned error %d/%d\n", - fname, ze, errno); + printf("opening `%s' returned error %d", fname, ze); + if (zip_error_get_sys_type(ze) == ZIP_ET_SYS) + printf("/%d", errno); + printf("\n"); return 1; }