|
Justin M. Forbes |
73d3c2 |
From dfbaa3059414b158ff7ce7a74ffff80b0fa2db9c Mon Sep 17 00:00:00 2001
|
|
Justin M. Forbes |
73d3c2 |
From: Eduardo Habkost <ehabkost@redhat.com>
|
|
Justin M. Forbes |
73d3c2 |
Date: Tue, 6 Apr 2010 19:38:53 -0300
|
|
Justin M. Forbes |
73d3c2 |
Subject: [PATCH] boot: remove unused boot_devices_bitmap variable
|
|
Justin M. Forbes |
73d3c2 |
|
|
Justin M. Forbes |
73d3c2 |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=561078
|
|
Justin M. Forbes |
73d3c2 |
|
|
Justin M. Forbes |
73d3c2 |
In addition to removing the variable, this also renames the parse_bootdevices()
|
|
Justin M. Forbes |
73d3c2 |
function to validate_bootdevices(), as we don't need its return value anymore.
|
|
Justin M. Forbes |
73d3c2 |
|
|
Justin M. Forbes |
73d3c2 |
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
Justin M. Forbes |
73d3c2 |
---
|
|
Justin M. Forbes |
73d3c2 |
vl.c | 8 +++-----
|
|
Justin M. Forbes |
73d3c2 |
1 files changed, 3 insertions(+), 5 deletions(-)
|
|
Justin M. Forbes |
73d3c2 |
|
|
Justin M. Forbes |
73d3c2 |
diff --git a/vl.c b/vl.c
|
|
Justin M. Forbes |
73d3c2 |
index 349f945..a71127c 100644
|
|
Justin M. Forbes |
73d3c2 |
--- a/vl.c
|
|
Justin M. Forbes |
73d3c2 |
+++ b/vl.c
|
|
Justin M. Forbes |
73d3c2 |
@@ -2517,7 +2517,7 @@ int qemu_boot_set(const char *boot_devices)
|
|
Justin M. Forbes |
73d3c2 |
return boot_set_handler(boot_set_opaque, boot_devices);
|
|
Justin M. Forbes |
73d3c2 |
}
|
|
Justin M. Forbes |
73d3c2 |
|
|
Justin M. Forbes |
73d3c2 |
-static int parse_bootdevices(char *devices)
|
|
Justin M. Forbes |
73d3c2 |
+static void validate_bootdevices(char *devices)
|
|
Justin M. Forbes |
73d3c2 |
{
|
|
Justin M. Forbes |
73d3c2 |
/* We just do some generic consistency checks */
|
|
Justin M. Forbes |
73d3c2 |
const char *p;
|
|
Justin M. Forbes |
73d3c2 |
@@ -2543,7 +2543,6 @@ static int parse_bootdevices(char *devices)
|
|
Justin M. Forbes |
73d3c2 |
}
|
|
Justin M. Forbes |
73d3c2 |
bitmap |= 1 << (*p - 'a');
|
|
Justin M. Forbes |
73d3c2 |
}
|
|
Justin M. Forbes |
73d3c2 |
- return bitmap;
|
|
Justin M. Forbes |
73d3c2 |
}
|
|
Justin M. Forbes |
73d3c2 |
|
|
Justin M. Forbes |
73d3c2 |
static void restore_boot_devices(void *opaque)
|
|
Justin M. Forbes |
73d3c2 |
@@ -4920,7 +4919,6 @@ static int virtcon_parse(const char *devname)
|
|
Justin M. Forbes |
73d3c2 |
int main(int argc, char **argv, char **envp)
|
|
Justin M. Forbes |
73d3c2 |
{
|
|
Justin M. Forbes |
73d3c2 |
const char *gdbstub_dev = NULL;
|
|
Justin M. Forbes |
73d3c2 |
- uint32_t boot_devices_bitmap = 0;
|
|
Justin M. Forbes |
73d3c2 |
int i;
|
|
Justin M. Forbes |
73d3c2 |
int snapshot, linux_boot;
|
|
Justin M. Forbes |
73d3c2 |
const char *initrd_filename;
|
|
Justin M. Forbes |
73d3c2 |
@@ -5215,13 +5213,13 @@ int main(int argc, char **argv, char **envp)
|
|
Justin M. Forbes |
73d3c2 |
|
|
Justin M. Forbes |
73d3c2 |
if (legacy ||
|
|
Justin M. Forbes |
73d3c2 |
get_param_value(buf, sizeof(buf), "order", optarg)) {
|
|
Justin M. Forbes |
73d3c2 |
- boot_devices_bitmap = parse_bootdevices(buf);
|
|
Justin M. Forbes |
73d3c2 |
+ validate_bootdevices(buf);
|
|
Justin M. Forbes |
73d3c2 |
pstrcpy(boot_devices, sizeof(boot_devices), buf);
|
|
Justin M. Forbes |
73d3c2 |
}
|
|
Justin M. Forbes |
73d3c2 |
if (!legacy) {
|
|
Justin M. Forbes |
73d3c2 |
if (get_param_value(buf, sizeof(buf),
|
|
Justin M. Forbes |
73d3c2 |
"once", optarg)) {
|
|
Justin M. Forbes |
73d3c2 |
- boot_devices_bitmap |= parse_bootdevices(buf);
|
|
Justin M. Forbes |
73d3c2 |
+ validate_bootdevices(buf);
|
|
Justin M. Forbes |
73d3c2 |
standard_boot_devices = qemu_strdup(boot_devices);
|
|
Justin M. Forbes |
73d3c2 |
pstrcpy(boot_devices, sizeof(boot_devices), buf);
|
|
Justin M. Forbes |
73d3c2 |
qemu_register_reset(restore_boot_devices,
|
|
Justin M. Forbes |
73d3c2 |
--
|
|
Justin M. Forbes |
73d3c2 |
1.6.6.1
|
|
Justin M. Forbes |
73d3c2 |
|