[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1] xentrace: adjust exit code for --help option





On Fri, May 26, 2023 at 1:38 PM Olaf Hering <olaf@xxxxxxxxx> wrote:
Invoking the --help option of any tool should not return with an error,
if that tool does have a documented and implemented help option.

Adjust the usage() function to exit with either error or success.
Handle the existing entry in the option table to call usage accordingly.

Adjust the getopt value for help. The char '?' is returned for unknown
options. Returning 'h' instead of '?' allows to handle --help.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

Reviewed-by: George Dunlap <george.dunlap@xxxxxxxxx>

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.