Re: [PATCH] wrapper: Fix a errno discrepancy on NetBSD.
- From
Collin Funk <collin.funk1@gmail.com>
- Date
- May 3, 2025, 18:56 UTC
- Message-ID
- <87frhlmsks.fsf@gmail.com>
- In-Reply-To
- <20250503133158.GA4450@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> I dunno. I don't mind making errno returns more consistent to prevent a > future foot-gun, but I think as a general rule we may be better off not > looking too hard at errno for exotic conditions.
I generally agree. But in this case FreeBSD only sets errno to EMLINK in this specific case and the only other case NetBSD sets errno to EFTYPE is when the O_REGULAR flag is used and the path is not a regular file. Using 'grep -r O_REGULAR' confirms it is never used in git, and since it is a NetBSD extension I doubt it will ever be used. So not an exotic case, in my opinion.
Thanks, Collin