Changeset 3969cd92c20f6b1f8a56ea1362617fe257643ac5
- Timestamp:
- 11/02/09 12:40:51 (3 years ago)
- Author:
- Erwan Velu <erwan.velu@…>
- Children:
- eed4119f07af14cb24ec3ae4e9678dbeb5de80de
- Parents:
- 291f0542a26110868069d9f92d7d71c9974e28ff, ad501c9ca99dad2f52af62399c3ff7da9bfe09b5
- git-committer:
- Erwan Velu <erwan.velu@free.fr> / 2009-11-02T13:40:51Z+0100
- Message:
-
Merge remote branch 'pam/hdt-0.3.5'
- Location:
- com32/hdt
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r291f05
|
r3969cd
|
|
| 253 | 253 | } |
| 254 | 254 | |
| | 255 | /** |
| | 256 | * do_reboot - reboot the system |
| | 257 | **/ |
| | 258 | static void do_reboot(int argc __unused, char** argv __unused, |
| | 259 | struct s_hardware *hardware) |
| | 260 | { |
| | 261 | /* Use specific syslinux call if needed */ |
| | 262 | if (issyslinux()) |
| | 263 | return runsyslinuxcmd(hardware->reboot_label); |
| | 264 | else |
| | 265 | return csprint(hardware->reboot_label, 0x07); |
| | 266 | } |
| | 267 | |
| 255 | 268 | /* Default hdt mode */ |
| 256 | 269 | struct cli_callback_descr list_hdt_default_modules[] = { |
| … |
… |
|
| 270 | 283 | .name = CLI_MENU, |
| 271 | 284 | .exec = goto_menu, |
| | 285 | }, |
| | 286 | { |
| | 287 | .name = CLI_REBOOT, |
| | 288 | .exec = do_reboot, |
| 272 | 289 | }, |
| 273 | 290 | { |
-
|
rf8ac66
|
rad501c
|
|
| 49 | 49 | #define CLI_EXIT "exit" |
| 50 | 50 | #define CLI_HELP "help" |
| | 51 | #define CLI_REBOOT "reboot" |
| 51 | 52 | #define CLI_SHOW "show" |
| 52 | 53 | #define CLI_SET "set" |
-
|
r47ac91
|
rd98e62
|
|
| 73 | 73 | sizeof(hardware->memtest_label)); |
| 74 | 74 | convert_isolinux_filename(hardware->memtest_label,hardware); |
| | 75 | } else if (!strncmp(argv[i], "reboot=", 7)) { |
| | 76 | strncpy(hardware->reboot_label, argv[i] + 7, |
| | 77 | sizeof(hardware->reboot_label)); |
| | 78 | convert_isolinux_filename(hardware->reboot_label,hardware); |
| 75 | 79 | } |
| 76 | 80 | } |
| … |
… |
|
| 134 | 138 | sizeof hardware->modules_alias_path); |
| 135 | 139 | memset(hardware->memtest_label, 0, sizeof hardware->memtest_label); |
| | 140 | memset(hardware->reboot_label, 0, sizeof hardware->reboot_label); |
| 136 | 141 | strcat(hardware->pciids_path, "pci.ids"); |
| 137 | 142 | strcat(hardware->modules_pcimap_path, "modules.pcimap"); |
| 138 | 143 | strcat(hardware->modules_alias_path, "modules.alias"); |
| 139 | 144 | strcat(hardware->memtest_label, "memtest"); |
| | 145 | strcat(hardware->reboot_label, "reboot.c32"); |
| 140 | 146 | } |
| 141 | 147 | |
-
|
r079f92
|
rd98e62
|
|
| 163 | 163 | char pciids_path[255]; |
| 164 | 164 | char memtest_label[255]; |
| | 165 | char reboot_label[255]; |
| 165 | 166 | }; |
| 166 | 167 | |
-
|
r51148f
|
r291f05
|
|
| 40 | 40 | set_menu_pos(SUBMENU_Y, SUBMENU_X); |
| 41 | 41 | |
| 42 | | snprintf(buffer, sizeof buffer, "Product : %s", PRODUCT_NAME); |
| | 42 | snprintf(buffer, sizeof buffer, "Product : %s", PRODUCT_NAME); |
| 43 | 43 | snprintf(statbuffer, sizeof statbuffer, "Product : %s", PRODUCT_NAME); |
| 44 | 44 | add_item(buffer, statbuffer, OPT_INACTIVE, NULL, 0); |
| 45 | 45 | menu->items_count++; |
| 46 | 46 | |
| 47 | | snprintf(buffer, sizeof buffer, "Version : %s", VERSION); |
| 48 | | snprintf(statbuffer, sizeof statbuffer, "Version : %s", VERSION); |
| | 47 | snprintf(buffer, sizeof buffer, "Version : %s (%s)", VERSION, CODENAME); |
| | 48 | snprintf(statbuffer, sizeof statbuffer, "Version : %s (%s)", VERSION,CODENAME); |
| 49 | 49 | add_item(buffer, statbuffer, OPT_INACTIVE, NULL, 0); |
| 50 | 50 | menu->items_count++; |
| 51 | 51 | |
| 52 | | snprintf(buffer, sizeof buffer, "Author : %s", AUTHOR); |
| 53 | | snprintf(statbuffer, sizeof statbuffer, "Author : %s", AUTHOR); |
| | 52 | snprintf(buffer, sizeof buffer, "Project Leader : %s", AUTHOR); |
| | 53 | snprintf(statbuffer, sizeof statbuffer, "Project Leader : %s", AUTHOR); |
| 54 | 54 | add_item(buffer, statbuffer, OPT_INACTIVE, NULL, 0); |
| 55 | 55 | menu->items_count++; |
| 56 | 56 | |
| 57 | | snprintf(buffer, sizeof buffer, "Contact : %s", CONTACT); |
| | 57 | snprintf(buffer, sizeof buffer, "Contact : %s", CONTACT); |
| 58 | 58 | snprintf(statbuffer, sizeof statbuffer, "Contact : %s", CONTACT); |
| | 59 | add_item(buffer, statbuffer, OPT_INACTIVE, NULL, 0); |
| | 60 | menu->items_count++; |
| | 61 | |
| | 62 | snprintf(buffer, sizeof buffer, "Core Developer : %s", CORE_DEVELOPER); |
| | 63 | snprintf(statbuffer, sizeof statbuffer, "Core Developer : %s", CORE_DEVELOPER); |
| 59 | 64 | add_item(buffer, statbuffer, OPT_INACTIVE, NULL, 0); |
| 60 | 65 | menu->items_count++; |
| … |
… |
|
| 62 | 67 | char *contributors[NB_CONTRIBUTORS] = CONTRIBUTORS; |
| 63 | 68 | for (int c=0; c<NB_CONTRIBUTORS; c++) { |
| 64 | | snprintf(buffer, sizeof buffer, "Contributor : %s", contributors[c]); |
| | 69 | snprintf(buffer, sizeof buffer, "Contributor : %s", contributors[c]); |
| 65 | 70 | snprintf(statbuffer, sizeof statbuffer, "Contributor : %s", contributors[c]); |
| 66 | 71 | add_item(buffer, statbuffer, OPT_INACTIVE, NULL, 0); |
-
|
ra4dfd1
|
rd98e62
|
|
| 293 | 293 | add_item("<A>bout", "About Menu", OPT_SUBMENU, NULL, |
| 294 | 294 | hdt_menu->about_menu.menu); |
| | 295 | add_item("<R>eboot", "Reboot", OPT_RUN, hardware->reboot_label, 0); |
| 295 | 296 | add_item("E<x>it","Exit", OPT_EXITMENU,NULL,0); |
| 296 | 297 | hdt_menu->main_menu.items_count++; |
-
|
r821b54
|
r291f05
|
|
| 49 | 49 | struct s_hardware hardware; |
| 50 | 50 | |
| 51 | | snprintf(version_string, sizeof version_string, "%s %s", |
| 52 | | PRODUCT_NAME,VERSION); |
| | 51 | snprintf(version_string, sizeof version_string, "%s %s (%s)", |
| | 52 | PRODUCT_NAME,VERSION, CODENAME); |
| 53 | 53 | |
| 54 | 54 | /* Opening the Syslinux console */ |
-
|
r4dc540
|
r291f05
|
|
| 32 | 32 | #define PRODUCT_NAME "Hardware Detection Tool" |
| 33 | 33 | #define AUTHOR "Erwan Velu" |
| | 34 | #define CORE_DEVELOPER "Pierre-Alexandre Meyer" |
| 34 | 35 | #define CONTACT "hdt@zytor.com" |
| 35 | | #define VERSION "0.3.5-pre1" |
| 36 | | #define NB_CONTRIBUTORS 3 |
| 37 | | #define CONTRIBUTORS {"Pierre-Alexandre Meyer", "Sebastien Gonzalve", "Gert Hulselmans"} |
| | 36 | #define VERSION "0.3.5-pre2" |
| | 37 | #define CODENAME "mojito" |
| | 38 | #define NB_CONTRIBUTORS 2 |
| | 39 | #define CONTRIBUTORS {"Sebastien Gonzalve", "Gert Hulselmans"} |
| 38 | 40 | |
| 39 | 41 | #define ATTR_PACKED __attribute__((packed)) |