"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Christian Weisgerber <naddy@mips.inka.de>
Subject:
Always report stat() error with path
To:
gameoftrees@openbsd.org
Date:
Fri, 14 Jul 2023 17:04:39 +0200

Download raw body.

Thread
Is there a reason to report a stat() error without path here?
This code has been unchanged since "initial 'got import' implementation".

diff /home/naddy/got
commit - 5fb50fce7978aa218c87ec7ac6c3f4e7bf20e5b3
path + /home/naddy/got
blob - 01fe4299c82e150fcd8020915536f48fc73bacbc
file + got/got.c
--- got/got.c
+++ got/got.c
@@ -463,7 +463,7 @@ edit_logmsg(char **logmsg, const char *editor, const c
 	}
 
 	if (stat(logmsg_path, &st2) == -1)
-		return got_error_from_errno("stat");
+		return got_error_from_errno2("stat", logmsg_path);
 
 	if (require_modification && st.st_size == st2.st_size &&
 	    timespeccmp(&st.st_mtim, &st2.st_mtim, ==))
-- 
Christian "naddy" Weisgerber                          naddy@mips.inka.de