aboutsummaryrefslogtreecommitdiffstats
path: root/com32/hdt
diff options
context:
space:
mode:
authorErwan Velu <erwan.velu@free.fr>2009-03-27 19:04:00 +0100
committerErwan Velu <erwan.velu@free.fr>2009-03-27 19:04:00 +0100
commitee72d1d5f191e2462edfec1c3b9be741633744c6 (patch)
tree1c3659b6a01b0f26e55f959149e0493ba55849af /com32/hdt
parenta9a3ddfc24b40caa54da1984d25a9f9915fb15a7 (diff)
downloadsyslinux.git-ee72d1d5f191e2462edfec1c3b9be741633744c6.tar.gz
syslinux.git-ee72d1d5f191e2462edfec1c3b9be741633744c6.tar.xz
syslinux.git-ee72d1d5f191e2462edfec1c3b9be741633744c6.zip
hdt: Adding memtest= boot parameter
Impact: memtest=<label> allow users to give another label name for the memtest call Prior to that version, memtest label was hardcoded to "memtest". Now, "memtest" is the default label but could be overrided by users.
Diffstat (limited to 'com32/hdt')
-rw-r--r--com32/hdt/hdt-common.c4
-rw-r--r--com32/hdt/hdt-common.h1
-rw-r--r--com32/hdt/hdt-menu-dmi.c4
-rw-r--r--com32/hdt/hdt-menu.c2
-rw-r--r--com32/hdt/hdt-menu.h2
5 files changed, 9 insertions, 4 deletions
diff --git a/com32/hdt/hdt-common.c b/com32/hdt/hdt-common.c
index d067d114..b2fdf8e7 100644
--- a/com32/hdt/hdt-common.c
+++ b/com32/hdt/hdt-common.c
@@ -44,6 +44,9 @@ void detect_parameters(const int argc, const char *argv[],
} else if (!strncmp(argv[i], "pciids=", 7)) {
strncpy(hardware->pciids_path, argv[i] + 7,
sizeof(hardware->pciids_path));
+ } else if (!strncmp(argv[i], "memtest=", 8)) {
+ strncpy(hardware->memtest_label, argv[i] + 8,
+ sizeof(hardware->memtest_label));
}
}
}
@@ -99,6 +102,7 @@ void init_hardware(struct s_hardware *hardware)
sizeof hardware->modules_pcimap_path);
strcat(hardware->pciids_path, "pci.ids");
strcat(hardware->modules_pcimap_path, "modules.pcimap");
+ strcat(hardware->memtest_label, "memtest");
}
/*
diff --git a/com32/hdt/hdt-common.h b/com32/hdt/hdt-common.h
index 99742f35..9d6bc5fe 100644
--- a/com32/hdt/hdt-common.h
+++ b/com32/hdt/hdt-common.h
@@ -117,6 +117,7 @@ struct s_hardware {
const struct syslinux_version *sv;
char modules_pcimap_path[255];
char pciids_path[255];
+ char memtest_label[255];
};
const char *find_argument(const char **argv, const char *argument);
diff --git a/com32/hdt/hdt-menu-dmi.c b/com32/hdt/hdt-menu-dmi.c
index 78c1c5e2..3915f2bf 100644
--- a/com32/hdt/hdt-menu-dmi.c
+++ b/com32/hdt/hdt-menu-dmi.c
@@ -365,7 +365,7 @@ static void compute_memory_module(struct s_my_menu *menu, s_dmi * dmi,
}
/* Compute the Memory menu */
-void compute_memory(struct s_hdt_menu *menu, s_dmi * dmi)
+void compute_memory(struct s_hdt_menu *menu, s_dmi * dmi, struct s_hardware *hardware)
{
char buffer[MENULEN + 1];
for (int i = 0; i < dmi->memory_count; i++) {
@@ -383,7 +383,7 @@ void compute_memory(struct s_hdt_menu *menu, s_dmi * dmi)
}
printf("MENU: Memory menu done (%d items)\n",
menu->memory_menu.items_count);
- add_item("Run Test", "Run Test", OPT_RUN, "memtest", 0);
+ add_item("Run Test", "Run Test", OPT_RUN, hardware->memtest_label, 0);
}
/* Compute Main IPMI menu */
diff --git a/com32/hdt/hdt-menu.c b/com32/hdt/hdt-menu.c
index 4f1b42fb..224974e0 100644
--- a/com32/hdt/hdt-menu.c
+++ b/com32/hdt/hdt-menu.c
@@ -141,7 +141,7 @@ void compute_submenus(struct s_hdt_menu *hdt_menu, struct s_hardware *hardware)
&(hardware->dmi));
for (int i = 0; i < hardware->dmi.memory_count; i++) {
if (hardware->dmi.memory[i].filled == true) {
- compute_memory(hdt_menu, &(hardware->dmi));
+ compute_memory(hdt_menu, &(hardware->dmi),hardware);
break;
}
}
diff --git a/com32/hdt/hdt-menu.h b/com32/hdt/hdt-menu.h
index 577072ec..7986c863 100644
--- a/com32/hdt/hdt-menu.h
+++ b/com32/hdt/hdt-menu.h
@@ -100,7 +100,7 @@ void compute_battery(struct s_my_menu *menu, s_dmi * dmi);
void compute_system(struct s_my_menu *menu, s_dmi * dmi);
void compute_chassis(struct s_my_menu *menu, s_dmi * dmi);
void compute_bios(struct s_my_menu *menu, s_dmi * dmi);
-void compute_memory(struct s_hdt_menu *menu, s_dmi * dmi);
+void compute_memory(struct s_hdt_menu *menu, s_dmi * dmi, struct s_hardware *hardware);
void compute_ipmi(struct s_my_menu *menu, s_dmi * dmi);
// Processor Stuff