From: Stefan Sperling Subject: Re: Always report stat() error with path To: Christian Weisgerber Cc: gameoftrees@openbsd.org Date: Fri, 14 Jul 2023 17:12:28 +0200 On Fri, Jul 14, 2023 at 05:04:39PM +0200, Christian Weisgerber wrote: > Is there a reason to report a stat() error without path here? > This code has been unchanged since "initial 'got import' implementation". I don't see a reason not to print this path. ok by me. > 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 > >