[PATCH] locale: Fix localedef exit code [BZ #22292]

Florian Weimer fw@deneb.enyo.de
Fri Oct 13 19:24:00 GMT 2017


* Carlos O'Donell:

>> These functions should not be inline and have printf/nonnull attributes.
>
> Without inline the compiler will complain about unused functions.

You could add __attribute__ ((unused)).

>> The condition needs to be !be_quiet || status != 0, otherwise
>> be_quiet also disables fatal errors.  This applies to
>> record_error_at_line, too.
>
> Fixed this differently.
>
> Even fatal errors should be quiet of --quiet is used, that's the purpose.
>
> Added:
>
> if (status != 0)
>   exit (status)

The manual page says that fatal errors are still reported.  That's the
existing behavior, as far as I can see.

> Question: Should locale/programs/locale.c 'static int verbose;' become
> 'int verbose'?

What's the background of this question?



More information about the Libc-alpha mailing list