Changeset 7770cc5dee8fe34e69492da723b75e024d9c3e90
- Timestamp:
- 11/04/09 01:51:33 (3 years ago)
- Author:
- Pierre-Alexandre Meyer <pierre@…>
- Children:
- 494fa55b2fe19660464b008af12694f2448512f1
- Parents:
- 4c87c3409e1788191541cc1e4897bc38f5fe02c6, 291f0542a26110868069d9f92d7d71c9974e28ff
- git-committer:
- Pierre-Alexandre Meyer <pierre@mouraf.org> / 2009-11-03T17:51:33Z-0800
- Message:
-
Merge commit 'hdt-0.3.5-pre2' into hdt-0.3.5
- Location:
- com32
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
rad501c
|
r7770cc
|
|
| 194 | 194 | { |
| 195 | 195 | char version_string[256]; |
| 196 | | snprintf(version_string, sizeof version_string, "%s %s", |
| 197 | | PRODUCT_NAME, VERSION); |
| | 196 | snprintf(version_string, sizeof version_string, "%s %s (%s)", |
| | 197 | PRODUCT_NAME, VERSION, CODENAME); |
| 198 | 198 | start_menu_mode(hardware, version_string); |
| 199 | 199 | return; |
| … |
… |
|
| 242 | 242 | reset_more_printf(); |
| 243 | 243 | more_printf("HDT\n"); |
| 244 | | more_printf(" Product : %s\n", PRODUCT_NAME); |
| 245 | | more_printf(" Version : %s\n", VERSION); |
| 246 | | more_printf(" Author : %s\n", AUTHOR); |
| 247 | | more_printf(" Contact : %s\n", CONTACT); |
| | 244 | more_printf(" Product : %s\n", PRODUCT_NAME); |
| | 245 | more_printf(" Version : %s (%s)\n", VERSION, CODENAME); |
| | 246 | more_printf(" Project Leader : %s\n", AUTHOR); |
| | 247 | more_printf(" Contact : %s\n", CONTACT); |
| | 248 | more_printf(" Core Developer : %s\n", CORE_DEVELOPER); |
| 248 | 249 | char *contributors[NB_CONTRIBUTORS] = CONTRIBUTORS; |
| 249 | 250 | for (int c = 0; c < NB_CONTRIBUTORS; c++) { |
| 250 | | more_printf(" Contributor : %s\n", contributors[c]); |
| | 251 | more_printf(" Contributor : %s\n", contributors[c]); |
| 251 | 252 | } |
| 252 | 253 | } |
-
|
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)) |
-
|
r3e9ec4
|
r4c87c3
|
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | | /* |
| 75 | | * cls - clear and initialize the entire screen |
| 76 | | * |
| 77 | | * Note: when initializing xterm, one has to specify that |
| 78 | | * G1 points to the alternate character set (this is not true |
| 79 | | * by default). Without the initial printf "\033)0", line drawing |
| 80 | | * characters won't be displayed. |
| 81 | | */ |
| 82 | | static inline void cls(void) |
| 83 | | { |
| 84 | | fputs("\033e\033%@\033)0\033(B\1#0\033[?25l\033[2J", stdout); |
| 85 | | } |
| | 74 | void cls(void); |
| 86 | 75 | |
| 87 | 76 | static inline void cursoroff(void) |
-
|
r71fb86
|
r4c87c3
|
|
| 114 | 114 | * Convert the VGA attribute @attr to an ANSI escape sequence and |
| 115 | 115 | * print it. |
| | 116 | * For performance, SGR parameters are cached. To reset them, |
| | 117 | * call cprint_vga2ansi('0', '0'). |
| 116 | 118 | **/ |
| 117 | 119 | static void cprint_vga2ansi(const char chr, const char attr) |
| … |
… |
|
| 120 | 122 | static uint16_t last_attr = 0x300; |
| 121 | 123 | char buf[16], *p; |
| | 124 | |
| | 125 | if (chr == '0' && attr == '0') { |
| | 126 | last_attr = 0x300; |
| | 127 | return; |
| | 128 | } |
| 122 | 129 | |
| 123 | 130 | if (attr != last_attr) { |
| … |
… |
|
| 164 | 171 | } |
| 165 | 172 | |
| | 173 | /* |
| | 174 | * cls - clear and initialize the entire screen |
| | 175 | * |
| | 176 | * Note: when initializing xterm, one has to specify that |
| | 177 | * G1 points to the alternate character set (this is not true |
| | 178 | * by default). Without the initial printf "\033)0", line drawing |
| | 179 | * characters won't be displayed. |
| | 180 | */ |
| | 181 | void cls(void) |
| | 182 | { |
| | 183 | fputs("\033e\033%@\033)0\033(B\1#0\033[?25l\033[2J", stdout); |
| | 184 | |
| | 185 | /* Reset SGR parameters cache */ |
| | 186 | cprint_vga2ansi('0', '0'); |
| | 187 | } |
| | 188 | |
| 166 | 189 | void reset_colors() |
| 167 | 190 | { |