[PATCH v2] fixdep: add fstat error handling
Ron Yorston
rmy at pobox.com
Wed May 1 06:41:28 UTC 2024
Sam James <sam at gentoo.org> wrote:
>David Leonard <d+busybox at adaptive-enterprises.com> writes:
>> I worry that the fprintf() may destroy the errno which perror() uses,
>> so you could get a random error message.
>> Perhaps remove the fprintf(s) completely? Because the context should be
>> clear enough from the filename alone that perror displays.
>
>Ah, a great point. Any preference between just stripping the fprintfs vs
>a better argument to perror, as we do in some places (but not very
>consistently)?
Or:
fprintf(stderr, "fixdep: fstat %s %s\n", depfile, strerror(errno));
Cheers,
Ron
More information about the busybox
mailing list