Page MenuHomeFreeBSD

veriexec: fixed usage and getopt issue on armv6
ClosedPublic

Authored by sebastien.bini_stormshield.eu on Sep 7 2022, 8:06 AM.
Tags
None
Referenced Files
F154427145: D36477.id110253.diff
Tue, Apr 28, 11:46 AM
Unknown Object (File)
Sun, Apr 26, 3:38 PM
Unknown Object (File)
Sun, Apr 26, 8:16 AM
Unknown Object (File)
Tue, Apr 21, 7:50 PM
Unknown Object (File)
Thu, Apr 16, 8:23 PM
Unknown Object (File)
Tue, Apr 14, 10:29 PM
Unknown Object (File)
Mon, Apr 13, 6:06 PM
Unknown Object (File)
Fri, Apr 10, 1:49 PM
Subscribers

Details

Reviewers
wma
mw
imp
Summary

This fixes an issue introduced by https://reviews.freebsd.org/D33246

getopt returns an int, which was stored inside c of type char. c was then compared to -1. All those type conversions worked fine on our amd64 systems, but not on armv6 architecture.

The -1 returned by getopt, stored in c, never successfully compared to -1, causing the program to fall into the usage error in the default: switch case.

I also fixed the usage function, as -C takes a path as parameter.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 47276
Build 44163: arc lint + arc unit