From 7f8c3936b8f81271a0f423ca57e90a2156c350cb Mon Sep 17 00:00:00 2001 From: Ellis Sarza-Nguyen Date: Mon, 14 Sep 2026 11:17:57 -0700 Subject: [PATCH] [examples] add htool interfact for mauv effective Since the firware support to get the effective mauv version. We just need to conenct the htool interface to return back the data collected. Signed-off-by: Ellis Sarza-Nguyen --- examples/htool_mauv.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/examples/htool_mauv.c b/examples/htool_mauv.c index 751a8f5..dc4ee23 100644 --- a/examples/htool_mauv.c +++ b/examples/htool_mauv.c @@ -50,7 +50,7 @@ int htool_mauv_compiled(const struct htool_invocation* inv) { return -1; } - struct hoth_response_mauv mauv; + struct hoth_response_mauv mauv = {0}; libhoth_error err = libhoth_fetch_mauv(dev, MAUV_STATE_COMPILED, HAVEN_MAUV, &mauv); if (err != HOTH_SUCCESS) { @@ -63,7 +63,20 @@ int htool_mauv_compiled(const struct htool_invocation* inv) { } int htool_mauv_effective(const struct htool_invocation* inv) { - // TODO: support FW MAUV effective once it's implemented in firmware. + struct libhoth_device* dev = htool_libhoth_device(); + if (!dev) { + return -1; + } + + struct hoth_response_mauv mauv = {0}; + libhoth_error err = + libhoth_fetch_mauv(dev, MAUV_STATE_EFFECTIVE, HAVEN_MAUV, &mauv); + if (err != HOTH_SUCCESS) { + htool_report_error("fetch_mauv", err); + return -1; + } + + print_firmware_mauv(&mauv); return 0; }