Commit graph

3 commits

Author SHA1 Message Date
Gerd Hoffmann
761d0b5fb7 hw/uefi: fix error handling in uefi_vars_json_load
Catch lseek errors.  Return on read errors.

Fixes: CID 1593154
Fixes: CID 1593157
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-ID: <20250319141159.1461621-4-kraxel@redhat.com>
2025-03-21 12:00:38 +01:00
Gerd Hoffmann
ae24cf139b hw/uefi: fix error handling in uefi_vars_json_save
Catch lseek errors.  Return on errors.
Use autoptr for the GString to simplify cleanup.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-ID: <20250319141159.1461621-3-kraxel@redhat.com>
2025-03-21 12:00:38 +01:00
Gerd Hoffmann
12058948ab hw/uefi: add var-service-json.c + qapi for NV vars.
Define qapi schema for the uefi variable store state.

Use it and the generated visitor helper functions to store persistent
(EFI_VARIABLE_NON_VOLATILE) variables in JSON format on disk.

Acked-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-ID: <20250225163031.1409078-15-kraxel@redhat.com>
[ incremental fix squashed in ]
Message-ID: <pji24p6oag7cn2rovus7rquo7q2c6tokuquobfro2sqorky7vu@tk7cxud6jw7f>
2025-03-04 12:02:50 +01:00