mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 04:36:52 -10:00
bhyve: add deprecation warning function
Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D58636
This commit is contained in:
1 parent
12857d8f42
commit
80d82fca1f
3 files changed
+13
-10
No files matched your search
@@ -266,16 +266,8 @@ bhyve_optparse(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* Handle backwards compatibility aliases in config options. */
|
||||
if (get_config_value("lpc.bootrom") != NULL &&
|
||||
get_config_value("bootrom") == NULL) {
|
||||
warnx("lpc.bootrom is deprecated, use '-o bootrom' instead");
|
||||
set_config_value("bootrom", get_config_value("lpc.bootrom"));
|
||||
}
|
||||
if (get_config_value("lpc.bootvars") != NULL &&
|
||||
get_config_value("bootvars") == NULL) {
|
||||
warnx("lpc.bootvars is deprecated, use '-o bootvars' instead");
|
||||
set_config_value("bootvars", get_config_value("lpc.bootvars"));
|
||||
}
|
||||
bhyve_cfg_warn("lpc.bootrom", "bootrom");
|
||||
bhyve_cfg_warn("lpc.bootvars", "bootvars");
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -242,6 +242,16 @@ out:
|
||||
return (-1);
|
||||
}
|
||||
|
||||
void
|
||||
bhyve_cfg_warn(const char *old, const char *new)
|
||||
{
|
||||
if (get_config_value(old) != NULL &&
|
||||
get_config_value(new) == NULL) {
|
||||
warnx("'%s' is deprecated, use '%s' instead", old, new);
|
||||
set_config_value(new, get_config_value(old));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
calc_mem_affinity(size_t vm_memsize)
|
||||
{
|
||||
|
||||
@@ -84,6 +84,7 @@ void bhyve_parse_gdb_options(const char *opt);
|
||||
int bhyve_pincpu_parse(const char *opt);
|
||||
int bhyve_topology_parse(const char *opt);
|
||||
int bhyve_numa_parse(const char *opt);
|
||||
void bhyve_cfg_warn(const char *old, const char *new);
|
||||
|
||||
void bhyve_init_vcpu(struct vcpu *vcpu);
|
||||
void bhyve_start_vcpu(struct vcpu *vcpu, bool bsp);
|
||||
|
||||
Reference in new issue
Block a user