Re: [hatari-devel] Exit status mismatch for hmsa |
[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]
Am Sat, 14 Dec 2024 09:59:54 +0200
schrieb Jean-Baptiste Queru <jbqueru@xxxxxxxxx>:
> Hi everyone, and thanks for the work on hatari.
>
> I use the hmsa utility as part of my build process, and I check its exit
> status for success.
>
> I am finding that the exit status is swapped: it returns 0 for error and 1
> for success, when I expect the opposite.
>
> I have traced the issue in hmsa.c:
> In lines 164 and 263, the return value of main(), retVal, is an int, as
> expected.
> However, in lines 243 and 254, retVal is initialized with the return value
> of File_Save and MSA_WriteDisk respectively, and those functions return a
> bool, where false (0) is error and true (1) is success.
> I have locally tweaked the code of lines 243 and 254, adding ? 0 : -1, and
> tested accordingly.
Hi!
Thanks for the report and the analyzis, it should be fixed now!
Thomas
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |