On 10/04/2021 12:29, Hiltjo Posthuma wrote:
> On Sat, Apr 10, 2021 at 11:59:59AM +0100, SW wrote:
>> Good morning,
>> The syspatch man page notes that '-c' "Is suitable for cron(8)", which
>> is true but would benefit from more details.
>>
>> Hopefully this is in line with the other man pages:
>> --- syspatch.8    Sun Oct 4 2020
>> +++ syspatch.8    Sat Apr 10 11:52:20 2021
>> @@ -45,6 +45,8 @@
>>  .It Fl c
>>  List available patches; suitable for
>>  .Xr cron 8 .
>> +Returns a zero (true) exit status if there are no patches to apply;
>> +otherwise it returns 1 (false) and a list of patches on standard output.
>>  .It Fl l
>>  List installed patches.
>>  .It Fl R
>>
>> Thanks,
>> S
>>
> Hi,
>
> It's already documented in the "EXIT STATUS" section, isn't it?
EXIT STATUS
     The syspatch utility exits 0 on success, and >0 if an error occurs.

That doesn't really sound clear to me- it'd not be unreasonable to argue
that listing available patches is successful whether there are some
patches or no patches.
Also, I think in this case it makes sense for the specific exit statuses
for that flag to be next to the flag itself, rather than putting
conditionals in the exit status section.

There is (some degree of) precedent for this in the test(1) DESCRIPTION
section- that lists the expected exit statuses even with them being also
listed in the EXIT STATUS section.
I think it probably makes sense to do so where the exit status is of
primary importance to the command being run?

Thanks,
S

Reply via email to