From 5118d7f4e6e00b7eac3ce08a16392a732edc0b2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Wed, 3 May 2017 17:16:55 +0700 Subject: print errno when reporting a system call error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- rerere.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rerere.c') diff --git a/rerere.c b/rerere.c index 971bfedfb2..1351b0c3fb 100644 --- a/rerere.c +++ b/rerere.c @@ -484,13 +484,13 @@ static int handle_file(const char *path, unsigned char *sha1, const char *output io.input = fopen(path, "r"); io.io.wrerror = 0; if (!io.input) - return error("Could not open %s", path); + return error_errno("Could not open %s", path); if (output) { io.io.output = fopen(output, "w"); if (!io.io.output) { fclose(io.input); - return error("Could not write %s", output); + return error_errno("Could not write %s", output); } } -- cgit v1.2.3