Re: [hatari-devel] Exit status mismatch for hmsa |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Exit status mismatch for hmsa
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Sat, 14 Dec 2024 17:51:41 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1734198703; bh=WUYgWpHItAXGSG4J6wRUZfJADxXUq8z2wUcwdLyfN68=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=EvdeRxnIMsPFiKk7nXK0NQS/mC4cwWIRfTcn252h3Hd2lgrjaXzwLJWDpMjbC6gN+ NfPze/MRbastJsonmVMLE96ETBHRW1aNPN+QxzDDIyxFycZZSlO06DWb7ewKYt+Apk bkJrLLxTWopiID//BdBWDUOUbuZo79w0daZ6DyqOEcKQCh+LQOQgCGV+aeM29TOgq9 eke0I45kYZGxIlvbnWxiiY/IQ6WZBX/3zp70N0GwZ+0LzZF2Z1NlaDCYK+ks02oHHO cB4hnlRuECRZ2z+rsIuwsKxiJUnfkEMM4P+RHPfBt3oHivIf84Dt+G7whAuLgfZVyF gnKVqEVssV1cQ==
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