Like other "-foo help" CLI, the qemu process should return 0 for
"-tpmdev help".
While touching this, switch to is_help_option() utility function as
suggested by Peter Maydell.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <
20250707101412.
2055581-1-marcandre.lureau@redhat.com>
#include "system/tpm.h"
#include "qemu/config-file.h"
#include "qemu/error-report.h"
+#include "qemu/help_option.h"
static QLIST_HEAD(, TPMBackend) tpm_backends =
QLIST_HEAD_INITIALIZER(tpm_backends);
{
QemuOpts *opts;
- if (!strcmp(optstr, "help")) {
+ if (is_help_option(optstr)) {
tpm_display_backend_drivers();
- return -1;
+ exit(EXIT_SUCCESS);
}
opts = qemu_opts_parse_noisily(opts_list, optstr, true);
if (!opts) {