mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 11:08:25 +00:00
replay: Simplify setting replay blockers
replay_add_blocker() takes an Error *. All callers pass one created
like this:
error_setg(&blocker, QERR_REPLAY_NOT_SUPPORTED, "some feature");
Folding this into replay_add_blocker() simplifies the callers, losing
a bit of generality we haven't needed in more than six years.
Since there are no other uses of macro QERR_REPLAY_NOT_SUPPORTED,
replace the remaining one by its expansion, and drop the macro.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20230207075115.1525-10-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
@@ -152,11 +152,8 @@ void configure_rtc(QemuOpts *opts)
|
||||
if (!strcmp(value, "utc")) {
|
||||
rtc_base_type = RTC_BASE_UTC;
|
||||
} else if (!strcmp(value, "localtime")) {
|
||||
Error *blocker = NULL;
|
||||
rtc_base_type = RTC_BASE_LOCALTIME;
|
||||
error_setg(&blocker, QERR_REPLAY_NOT_SUPPORTED,
|
||||
"-rtc base=localtime");
|
||||
replay_add_blocker(blocker);
|
||||
replay_add_blocker("-rtc base=localtime");
|
||||
} else {
|
||||
rtc_base_type = RTC_BASE_DATETIME;
|
||||
configure_rtc_base_datetime(value);
|
||||
|
||||
Reference in New Issue
Block a user