From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41198) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPCd5-0000rx-2L for qemu-devel@nongnu.org; Sun, 16 Mar 2014 11:05:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPCcz-0002dF-3D for qemu-devel@nongnu.org; Sun, 16 Mar 2014 11:05:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27443) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPCcy-0002cx-Ro for qemu-devel@nongnu.org; Sun, 16 Mar 2014 11:05:29 -0400 From: Amos Kong Date: Sun, 16 Mar 2014 23:05:20 +0800 Message-Id: <1394982320-22010-1-git-send-email-akong@redhat.com> Subject: [Qemu-devel] [PATCH] update names in option tables to match with actual command-line spelling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, armbru@redhat.com, aliguori@amazon.com, afaerber@suse.de This patch makes all names in option table to match with actual command-line spelling, it will be helpful when we search in option tables. Signed-off-by: Amos Kong --- hw/nvram/fw_cfg.c | 4 ++-- include/qemu/option.h | 2 +- vl.c | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c index cb36dc2..1c75507 100644 --- a/hw/nvram/fw_cfg.c +++ b/hw/nvram/fw_cfg.c @@ -125,7 +125,7 @@ static void fw_cfg_bootsplash(FWCfgState *s) const char *temp; /* get user configuration */ - QemuOptsList *plist = qemu_find_opts("boot-opts"); + QemuOptsList *plist = qemu_find_opts("boot"); QemuOpts *opts = QTAILQ_FIRST(&plist->head); if (opts != NULL) { temp = qemu_opt_get(opts, "splash"); @@ -191,7 +191,7 @@ static void fw_cfg_reboot(FWCfgState *s) const char *temp; /* get user configuration */ - QemuOptsList *plist = qemu_find_opts("boot-opts"); + QemuOptsList *plist = qemu_find_opts("boot"); QemuOpts *opts = QTAILQ_FIRST(&plist->head); if (opts != NULL) { temp = qemu_opt_get(opts, "reboot-timeout"); diff --git a/include/qemu/option.h b/include/qemu/option.h index 8c0ac34..96b7c29 100644 --- a/include/qemu/option.h +++ b/include/qemu/option.h @@ -102,7 +102,7 @@ typedef struct QemuOptDesc { } QemuOptDesc; struct QemuOptsList { - const char *name; + const char *name; /* option name */ const char *implied_opt_name; bool merge_lists; /* Merge multiple uses of option into a single list? */ QTAILQ_HEAD(, QemuOpts) head; diff --git a/vl.c b/vl.c index a967b17..f590db6 100644 --- a/vl.c +++ b/vl.c @@ -379,7 +379,7 @@ static QemuOptsList qemu_machine_opts = { }; static QemuOptsList qemu_boot_opts = { - .name = "boot-opts", + .name = "boot", .implied_opt_name = "order", .merge_lists = true, .head = QTAILQ_HEAD_INITIALIZER(qemu_boot_opts.head), @@ -1303,7 +1303,7 @@ static void numa_add(const char *optarg) } static QemuOptsList qemu_smp_opts = { - .name = "smp-opts", + .name = "smp", .implied_opt_name = "cpus", .merge_lists = true, .head = QTAILQ_HEAD_INITIALIZER(qemu_smp_opts.head), @@ -3109,7 +3109,7 @@ int main(int argc, char **argv, char **envp) drive_add(IF_DEFAULT, 2, optarg, CDROM_OPTS); break; case QEMU_OPTION_boot: - opts = qemu_opts_parse(qemu_find_opts("boot-opts"), optarg, 1); + opts = qemu_opts_parse(qemu_find_opts("boot"), optarg, 1); if (!opts) { exit(1); } @@ -3545,7 +3545,7 @@ int main(int argc, char **argv, char **envp) } break; case QEMU_OPTION_smp: - if (!qemu_opts_parse(qemu_find_opts("smp-opts"), optarg, 1)) { + if (!qemu_opts_parse(qemu_find_opts("smp"), optarg, 1)) { exit(1); } break; @@ -3881,7 +3881,7 @@ int main(int argc, char **argv, char **envp) data_dir[data_dir_idx++] = CONFIG_QEMU_DATADIR; } - smp_parse(qemu_opts_find(qemu_find_opts("smp-opts"), NULL)); + smp_parse(qemu_opts_find(qemu_find_opts("smp"), NULL)); machine->max_cpus = machine->max_cpus ?: 1; /* Default to UP */ if (smp_cpus > machine->max_cpus) { @@ -4057,7 +4057,7 @@ int main(int argc, char **argv, char **envp) bios_name = qemu_opt_get(machine_opts, "firmware"); boot_order = machine->default_boot_order; - opts = qemu_opts_find(qemu_find_opts("boot-opts"), NULL); + opts = qemu_opts_find(qemu_find_opts("boot"), NULL); if (opts) { char *normal_boot_order; const char *order, *once; -- 1.8.5.3