Commit fdaf2d58 authored by Thomas Huth's avatar Thomas Huth
Browse files

Remove the deprecated options -startdate, -localtime and -rtc-td-hack



Deprecated since two releases, nobody complained, thus it's time to
remove them now.

Acked-by: default avatarPeter Krempa <pkrempa@redhat.com>
Acked-by: default avatarJán Tomko <jtomko@redhat.com>
Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
parent 2feac451
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -96,19 +96,6 @@ The @code{--no-frame} argument works with SDL 1.2 only. The other user
interfaces never implemented this in the first place. So this will be
removed together with SDL 1.2 support.

@subsection -rtc-td-hack (since 2.12.0)

The @code{-rtc-td-hack} option has been replaced by
@code{-rtc driftfix=slew}.

@subsection -localtime (since 2.12.0)

The @code{-localtime} option has been replaced by @code{-rtc base=localtime}.

@subsection -startdate (since 2.12.0)

The @code{-startdate} option has been replaced by @code{-rtc base=@var{date}}.

@subsection -virtioconsole (since 3.0.0)

Option @option{-virtioconsole} has been replaced by
+0 −7
Original line number Diff line number Diff line
@@ -1711,9 +1711,6 @@ Windows 2000 is installed, you no longer need this option (this option
slows down the IDE transfers).
ETEXI

HXCOMM Deprecated by -rtc
DEF("rtc-td-hack", 0, QEMU_OPTION_rtc_td_hack, "", QEMU_ARCH_I386)

DEF("no-fd-bootchk", 0, QEMU_OPTION_no_fd_bootchk,
    "-no-fd-bootchk  disable boot signature checking for floppy disks\n",
    QEMU_ARCH_I386)
@@ -3471,10 +3468,6 @@ ETEXI
HXCOMM Silently ignored for compatibility
DEF("clock", HAS_ARG, QEMU_OPTION_clock, "", QEMU_ARCH_ALL)

HXCOMM Options deprecated by -rtc
DEF("localtime", 0, QEMU_OPTION_localtime, "", QEMU_ARCH_ALL)
DEF("startdate", HAS_ARG, QEMU_OPTION_startdate, "", QEMU_ARCH_ALL)

DEF("rtc", HAS_ARG, QEMU_OPTION_rtc, \
    "-rtc [base=utc|localtime|date][,clock=host|rt|vm][,driftfix=none|slew]\n" \
    "                set the RTC base and clock, enable drift fix for clock ticks (x86 only)\n",
+22 −54
Original line number Diff line number Diff line
@@ -823,26 +823,16 @@ int qemu_timedate_diff(struct tm *tm)
    return seconds - qemu_time();
}

static void configure_rtc_date_offset(const char *startdate, int legacy)
static void configure_rtc_date_offset(const char *startdate)
{
    time_t rtc_start_date;
    struct tm tm;

    if (!strcmp(startdate, "now") && legacy) {
        rtc_date_offset = -1;
    } else {
        if (sscanf(startdate, "%d-%d-%dT%d:%d:%d",
                   &tm.tm_year,
                   &tm.tm_mon,
                   &tm.tm_mday,
                   &tm.tm_hour,
                   &tm.tm_min,
                   &tm.tm_sec) == 6) {
    if (sscanf(startdate, "%d-%d-%dT%d:%d:%d", &tm.tm_year, &tm.tm_mon,
               &tm.tm_mday, &tm.tm_hour, &tm.tm_min, &tm.tm_sec) == 6) {
        /* OK */
    } else if (sscanf(startdate, "%d-%d-%d",
                          &tm.tm_year,
                          &tm.tm_mon,
                          &tm.tm_mday) == 3) {
                      &tm.tm_year, &tm.tm_mon, &tm.tm_mday) == 3) {
        tm.tm_hour = 0;
        tm.tm_min = 0;
        tm.tm_sec = 0;
@@ -861,7 +851,6 @@ static void configure_rtc_date_offset(const char *startdate, int legacy)
    }
    rtc_date_offset = qemu_time() - rtc_start_date;
}
}

static void configure_rtc(QemuOpts *opts)
{
@@ -878,7 +867,7 @@ static void configure_rtc(QemuOpts *opts)
                      "-rtc base=localtime");
            replay_add_blocker(blocker);
        } else {
            configure_rtc_date_offset(value, 0);
            configure_rtc_date_offset(value);
        }
    }
    value = qemu_opt_get(opts, "clock");
@@ -3269,11 +3258,6 @@ int main(int argc, char **argv, char **envp)
            case QEMU_OPTION_k:
                keyboard_layout = optarg;
                break;
            case QEMU_OPTION_localtime:
                rtc_utc = 0;
                warn_report("This option is deprecated, "
                            "use '-rtc base=localtime' instead.");
                break;
            case QEMU_OPTION_vga:
                vga_model = optarg;
                default_vga = 0;
@@ -3526,18 +3510,6 @@ int main(int argc, char **argv, char **envp)
            case QEMU_OPTION_win2k_hack:
                win2k_install_hack = 1;
                break;
            case QEMU_OPTION_rtc_td_hack: {
                static GlobalProperty slew_lost_ticks = {
                    .driver   = "mc146818rtc",
                    .property = "lost_tick_policy",
                    .value    = "slew",
                };

                qdev_prop_register_global(&slew_lost_ticks);
                warn_report("This option is deprecated, "
                            "use '-rtc driftfix=slew' instead.");
                break;
            }
            case QEMU_OPTION_acpitable:
                opts = qemu_opts_parse_noisily(qemu_find_opts("acpi"),
                                               optarg, true);
@@ -3723,10 +3695,6 @@ int main(int argc, char **argv, char **envp)
                 */
                warn_report("This option is ignored and will be removed soon");
                break;
            case QEMU_OPTION_startdate:
                warn_report("This option is deprecated, use '-rtc base=' instead.");
                configure_rtc_date_offset(optarg, 1);
                break;
            case QEMU_OPTION_rtc:
                opts = qemu_opts_parse_noisily(qemu_find_opts("rtc"), optarg,
                                               false);