mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-24 00:18:36 -07:00
Removal of deprecated options and improvements for the qtests
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJbiPfvAAoJEC7Z13T+cC21+yUP/ibp2ux3BDXhd7L82YwIu7f2 VHrXxmJPdyPhYNu96GMrGsbX4uiNKx0J0BGAdIScMv1Pf8XrWVP5C6+vkPuknCbI upN5HHZlGYbc2kM/XPBJaH/jqfkmBXX/xzEU1DVwi9V9jYIVv4Yi1rGmWXelHXoc eenywK5M0fWWrSIdfA44UC2O78RnF/FIHgavnO6DPpTxtbU3abbZSYMW3H7+hX3k VtqKdfuouLjY9KfUaij5BaihYGXnIX6cEY4g+uet34ci+pQITWqOScVQyqU64KKf PiDrd8y5bV+5Xf4doCTizVvA89BbAFfuSnLmhb4KPlEtiikvtNV2uRSojCzviqoC XYzPA/KkogZ1VM3A9L5/JOJlIxj9483gZffjEqRd/cdasY55X88cdv+tFH83lEaA eE7sNep0NBEBKIGE32QmElbv7Z9bv5Rf6UQq5xwkZaFswSLabDQUUEhDiZP9+am1 cV8vC02FYQxi9tfHr7sr5Jauyrln46UfT9aE1R3S5KiRQj4ggTALidptKzHyxSIz 6ST07qx6lTEVZXOTtLbziAW2LFXrni0KZUK71PYIIiKTrickNIoIj0xamr/9YUcQ kLyPUXL8wJ3MrkR7g1c3d/umgURGw89U6gU7MlIYKcRUBwDVNNnPoogt7p6h+6vg PcS9cfVOs97SEbfUPOzY =NcP+ -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2018-08-31' into staging Removal of deprecated options and improvements for the qtests # gpg: Signature made Fri 31 Aug 2018 09:10:23 BST # gpg: using RSA key 2ED9D774FE702DB5 # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" # gpg: aka "Thomas Huth <thuth@redhat.com>" # gpg: aka "Thomas Huth <huth@tuxfamily.org>" # gpg: aka "Thomas Huth <th.huth@posteo.de>" # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * remotes/huth-gitlab/tags/pull-request-2018-08-31: tests: add a qmp success-response test tests: add qmp/qom-set-without-value test tests: add qmp/object-add-without-props test tests: add qmp_assert_error_class() tests/libqos: Utilize newer glib spawn check net: Remove the deprecated -tftp, -bootp, -redir and -smb options Remove the deprecated options -startdate, -localtime and -rtc-td-hack Remove the deprecated -nodefconfig option Remove the deprecated -balloon option Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
09d8277eb0
19 changed files with 158 additions and 395 deletions
132
vl.c
132
vl.c
|
|
@ -823,44 +823,33 @@ 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;
|
||||
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_hour = 0;
|
||||
tm.tm_min = 0;
|
||||
tm.tm_sec = 0;
|
||||
} 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) {
|
||||
/* OK */
|
||||
} else if (sscanf(startdate, "%d-%d-%d",
|
||||
&tm.tm_year,
|
||||
&tm.tm_mon,
|
||||
&tm.tm_mday) == 3) {
|
||||
tm.tm_hour = 0;
|
||||
tm.tm_min = 0;
|
||||
tm.tm_sec = 0;
|
||||
} else {
|
||||
goto date_fail;
|
||||
}
|
||||
tm.tm_year -= 1900;
|
||||
tm.tm_mon--;
|
||||
rtc_start_date = mktimegm(&tm);
|
||||
if (rtc_start_date == -1) {
|
||||
date_fail:
|
||||
error_report("invalid date format");
|
||||
error_printf("valid formats: "
|
||||
"'2006-06-17T16:01:21' or '2006-06-17'\n");
|
||||
exit(1);
|
||||
}
|
||||
rtc_date_offset = qemu_time() - rtc_start_date;
|
||||
goto date_fail;
|
||||
}
|
||||
tm.tm_year -= 1900;
|
||||
tm.tm_mon--;
|
||||
rtc_start_date = mktimegm(&tm);
|
||||
if (rtc_start_date == -1) {
|
||||
date_fail:
|
||||
error_report("invalid date format");
|
||||
error_printf("valid formats: "
|
||||
"'2006-06-17T16:01:21' or '2006-06-17'\n");
|
||||
exit(1);
|
||||
}
|
||||
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");
|
||||
|
|
@ -2125,36 +2114,6 @@ static void parse_display(const char *p)
|
|||
}
|
||||
}
|
||||
|
||||
static int balloon_parse(const char *arg)
|
||||
{
|
||||
QemuOpts *opts;
|
||||
|
||||
warn_report("This option is deprecated. "
|
||||
"Use '--device virtio-balloon' to enable the balloon device.");
|
||||
|
||||
if (strcmp(arg, "none") == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!strncmp(arg, "virtio", 6)) {
|
||||
if (arg[6] == ',') {
|
||||
/* have params -> parse them */
|
||||
opts = qemu_opts_parse_noisily(qemu_find_opts("device"), arg + 7,
|
||||
false);
|
||||
if (!opts)
|
||||
return -1;
|
||||
} else {
|
||||
/* create empty opts */
|
||||
opts = qemu_opts_create(qemu_find_opts("device"), NULL, 0,
|
||||
&error_abort);
|
||||
}
|
||||
qemu_opt_set(opts, "driver", "virtio-balloon", &error_abort);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
char *qemu_find_file(int type, const char *name)
|
||||
{
|
||||
int i;
|
||||
|
|
@ -3027,7 +2986,6 @@ int main(int argc, char **argv, char **envp)
|
|||
|
||||
popt = lookup_opt(argc, argv, &optarg, &optind);
|
||||
switch (popt->index) {
|
||||
case QEMU_OPTION_nodefconfig:
|
||||
case QEMU_OPTION_nouserconfig:
|
||||
userconfig = false;
|
||||
break;
|
||||
|
|
@ -3207,24 +3165,6 @@ int main(int argc, char **argv, char **envp)
|
|||
exit(1);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#ifdef CONFIG_SLIRP
|
||||
case QEMU_OPTION_tftp:
|
||||
error_report("The -tftp option is deprecated. "
|
||||
"Please use '-netdev user,tftp=...' instead.");
|
||||
legacy_tftp_prefix = optarg;
|
||||
break;
|
||||
case QEMU_OPTION_bootp:
|
||||
error_report("The -bootp option is deprecated. "
|
||||
"Please use '-netdev user,bootfile=...' instead.");
|
||||
legacy_bootp_filename = optarg;
|
||||
break;
|
||||
case QEMU_OPTION_redir:
|
||||
error_report("The -redir option is deprecated. "
|
||||
"Please use '-netdev user,hostfwd=...' instead.");
|
||||
if (net_slirp_redir(optarg) < 0)
|
||||
exit(1);
|
||||
break;
|
||||
#endif
|
||||
case QEMU_OPTION_bt:
|
||||
add_device_config(DEV_BT, optarg);
|
||||
|
|
@ -3298,11 +3238,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;
|
||||
|
|
@ -3555,18 +3490,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);
|
||||
|
|
@ -3658,12 +3581,6 @@ int main(int argc, char **argv, char **envp)
|
|||
case QEMU_OPTION_no_hpet:
|
||||
no_hpet = 1;
|
||||
break;
|
||||
case QEMU_OPTION_balloon:
|
||||
if (balloon_parse(optarg) < 0) {
|
||||
error_report("unknown -balloon argument %s", optarg);
|
||||
exit(1);
|
||||
}
|
||||
break;
|
||||
case QEMU_OPTION_no_reboot:
|
||||
no_reboot = 1;
|
||||
break;
|
||||
|
|
@ -3758,10 +3675,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);
|
||||
|
|
@ -3961,7 +3874,6 @@ int main(int argc, char **argv, char **envp)
|
|||
case QEMU_OPTION_enable_sync_profile:
|
||||
qsp_enable();
|
||||
break;
|
||||
case QEMU_OPTION_nodefconfig:
|
||||
case QEMU_OPTION_nouserconfig:
|
||||
/* Nothing to be parsed here. Especially, do not error out below. */
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue