1 /* ----------------------------------------------------------------------- *
3 * Copyright 2009 Erwan Velu - All Rights Reserved
5 * Permission is hereby granted, free of charge, to any person
6 * obtaining a copy of this software and associated documentation
7 * files (the "Software"), to deal in the Software without
8 * restriction, including without limitation the rights to use,
9 * copy, modify, merge, publish, distribute, sublicense, and/or
10 * sell copies of the Software, and to permit persons to whom
11 * the Software is furnished to do so, subject to the following
14 * The above copyright notice and this permission notice shall
15 * be included in all copies or substantial portions of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24 * OTHER DEALINGS IN THE SOFTWARE.
26 * -----------------------------------------------------------------------
29 #ifndef DEFINE_HDT_MENU_H
30 #define DEFINE_HDT_MENU_H
38 #include "hdt-common.h"
49 #define MAX_PCI_SUB_MENU 128
50 #define MAX_MEMORY_SUB_MENU 32
51 #define MAX_DISK_SUB_MENU 32
59 struct s_my_menu main_menu
;
60 struct s_my_menu cpu_menu
;
61 struct s_my_menu mobo_menu
;
62 struct s_my_menu chassis_menu
;
63 struct s_my_menu bios_menu
;
64 struct s_my_menu ipmi_menu
;
65 struct s_my_menu system_menu
;
66 struct s_my_menu pci_menu
;
67 struct s_my_menu pci_sub_menu
[MAX_PCI_SUB_MENU
];
68 struct s_my_menu kernel_menu
;
69 struct s_my_menu memory_menu
;
70 struct s_my_menu memory_sub_menu
[MAX_MEMORY_SUB_MENU
];
71 struct s_my_menu disk_menu
;
72 struct s_my_menu disk_sub_menu
[MAX_DISK_SUB_MENU
];
73 struct s_my_menu battery_menu
;
74 struct s_my_menu syslinux_menu
;
75 struct s_my_menu about_menu
;
76 struct s_my_menu summary_menu
;
77 struct s_my_menu pxe_menu
;
78 struct s_my_menu vesa_menu
;
79 struct s_my_menu vesa_card_menu
;
80 struct s_my_menu vesa_modes_menu
;
81 struct s_my_menu vpd_menu
;
82 int total_menu_count
; // Sum of all menus we have
85 TIMEOUTCODE
ontimeout(void);
86 void keys_handler(t_menusystem
* ms
87 __attribute__ ((unused
)), t_menuitem
* mi
, int scancode
);
90 int compute_PCI(struct s_hdt_menu
*hdt_menu
, struct s_hardware
*hardware
);
93 void compute_kernel(struct s_my_menu
*menu
, struct s_hardware
*hardware
);
96 void compute_disks(struct s_hdt_menu
*menu
, struct s_hardware
*hardware
);
99 void compute_motherboard(struct s_my_menu
*menu
, s_dmi
* dmi
);
100 void compute_battery(struct s_my_menu
*menu
, s_dmi
* dmi
);
101 void compute_system(struct s_my_menu
*menu
, s_dmi
* dmi
);
102 void compute_chassis(struct s_my_menu
*menu
, s_dmi
* dmi
);
103 void compute_bios(struct s_my_menu
*menu
, s_dmi
* dmi
);
104 void compute_memory(struct s_hdt_menu
*menu
, s_dmi
* dmi
,
105 struct s_hardware
*hardware
);
106 void compute_ipmi(struct s_my_menu
*menu
, s_dmi
* dmi
);
109 void compute_vpd(struct s_my_menu
*menu
, struct s_hardware
*hardware
);
112 void compute_processor(struct s_my_menu
*menu
, struct s_hardware
*hardware
);
115 void compute_syslinuxmenu(struct s_my_menu
*menu
, struct s_hardware
*hardware
);
118 void compute_aboutmenu(struct s_my_menu
*menu
);
121 void compute_summarymenu(struct s_my_menu
*menu
, struct s_hardware
*hardware
);
124 void compute_PXE(struct s_my_menu
*menu
, struct s_hardware
*hardware
);
127 int compute_VESA(struct s_hdt_menu
*hdt_menu
, struct s_hardware
*hardware
);
129 int start_menu_mode(struct s_hardware
*hardware
, char *version_string
);
130 void setup_menu(char *version
);
131 void compute_main_menu(struct s_hdt_menu
*hdt_menu
,
132 struct s_hardware
*hardware
);
133 void compute_submenus(struct s_hdt_menu
*hdt_menu
, struct s_hardware
*hardware
);
134 void detect_hardware(struct s_hardware
*hardware
);