diff options
-rw-r--r-- | com32/hdt/hdt-ata.c | 8 | ||||
-rw-r--r-- | com32/hdt/hdt-cli-dmi.c | 52 | ||||
-rw-r--r-- | com32/hdt/hdt-cli-hdt.c | 20 | ||||
-rw-r--r-- | com32/hdt/hdt-cli-pci.c | 12 | ||||
-rw-r--r-- | com32/hdt/hdt-cli.c | 10 | ||||
-rw-r--r-- | com32/hdt/hdt-common.c | 10 |
6 files changed, 56 insertions, 56 deletions
diff --git a/com32/hdt/hdt-ata.c b/com32/hdt/hdt-ata.c index 4e3ea438..35d422cb 100644 --- a/com32/hdt/hdt-ata.c +++ b/com32/hdt/hdt-ata.c @@ -213,7 +213,7 @@ int get_disk_params(int disk, struct diskinfo *disk_info) memcpy(&dp, __com32.cs_bounce, sizeof(struct device_parameter)); if (outreg.eflags.l & EFLAGS_CF) { - printf("Disk 0x%X doesn't supports EDD 3.0\n", disk); + more_printf("Disk 0x%X doesn't supports EDD 3.0\n", disk); return -1; } @@ -256,7 +256,7 @@ int get_disk_params(int disk, struct diskinfo *disk_info) memcpy(&aid, __com32.cs_bounce, sizeof(struct ata_identify_device)); if (outreg.eflags.l & EFLAGS_CF) { - printf("Disk 0x%X: Failed to Identify Device\n", disk); + more_printf("Disk 0x%X: Failed to Identify Device\n", disk); //FIXME return 0; } @@ -266,8 +266,8 @@ int get_disk_params(int disk, struct diskinfo *disk_info) char buff[sizeof(struct ata_identify_device)]; memcpy(buff, &aid, sizeof(struct ata_identify_device)); for (int j = 0; j < sizeof(struct ata_identify_device); j++) - printf("model=|%c|\n", buff[j]); - printf("Disk 0x%X : %s %s %s\n", disk, aid.model, aid.fw_rev, + more_printf("model=|%c|\n", buff[j]); + more_printf("Disk 0x%X : %s %s %s\n", disk, aid.model, aid.fw_rev, aid.serial_no); #endif diff --git a/com32/hdt/hdt-cli-dmi.c b/com32/hdt/hdt-cli-dmi.c index d5cc6f13..82b326d8 100644 --- a/com32/hdt/hdt-cli-dmi.c +++ b/com32/hdt/hdt-cli-dmi.c @@ -40,34 +40,34 @@ static void show_dmi_modules(int argc __unused, char** argv __unused, char available_dmi_commands[1024]; memset(available_dmi_commands, 0, sizeof(available_dmi_commands)); - printf("Available DMI modules on your system:\n"); + more_printf("Available DMI modules on your system:\n"); if (hardware->dmi.base_board.filled == true) - printf("\t%s\n", CLI_DMI_BASE_BOARD); + more_printf("\t%s\n", CLI_DMI_BASE_BOARD); if (hardware->dmi.battery.filled == true) - printf("\t%s\n", CLI_DMI_BATTERY); + more_printf("\t%s\n", CLI_DMI_BATTERY); if (hardware->dmi.bios.filled == true) - printf("\t%s\n", CLI_DMI_BIOS); + more_printf("\t%s\n", CLI_DMI_BIOS); if (hardware->dmi.chassis.filled == true) - printf("\t%s\n", CLI_DMI_CHASSIS); + more_printf("\t%s\n", CLI_DMI_CHASSIS); for (int i = 0; i < hardware->dmi.memory_count; i++) { if (hardware->dmi.memory[i].filled == true) { - printf("\tbank <number>\n", CLI_DMI_MEMORY); + more_printf("\tbank <number>\n", CLI_DMI_MEMORY); break; } } if (hardware->dmi.processor.filled == true) - printf("\t%s\n", CLI_DMI_PROCESSOR); + more_printf("\t%s\n", CLI_DMI_PROCESSOR); if (hardware->dmi.system.filled == true) - printf("\t%s\n", CLI_DMI_SYSTEM); + more_printf("\t%s\n", CLI_DMI_SYSTEM); if (hardware->dmi.ipmi.filled == true) - printf("\t%s\n", CLI_DMI_IPMI); + more_printf("\t%s\n", CLI_DMI_IPMI); } static void show_dmi_base_board(int argc __unused, char** argv __unused, struct s_hardware *hardware) { if (hardware->dmi.base_board.filled == false) { - printf("base_board information not found on your system, see " + more_printf("base_board information not found on your system, see " "`show list' to see which module is available.\n"); return; } @@ -93,7 +93,7 @@ static void show_dmi_system(int argc __unused, char** argv __unused, struct s_hardware *hardware) { if (hardware->dmi.system.filled == false) { - printf("system information not found on your system, see " + more_printf("system information not found on your system, see " "`show list' to see which module is available.\n"); return; } @@ -113,7 +113,7 @@ static void show_dmi_bios(int argc __unused, char** argv __unused, struct s_hardware *hardware) { if (hardware->dmi.bios.filled == false) { - printf("bios information not found on your system, see " + more_printf("bios information not found on your system, see " "`show list' to see which module is available.\n"); return; } @@ -160,7 +160,7 @@ static void show_dmi_chassis(int argc __unused, char** argv __unused, struct s_hardware *hardware) { if (hardware->dmi.chassis.filled == false) { - printf("chassis information not found on your system, see " + more_printf("chassis information not found on your system, see " "`show list' to see which module is available.\n"); return; } @@ -194,7 +194,7 @@ static void show_dmi_ipmi(int argc __unused, char **argv __unused, struct s_hardware *hardware) { if (hardware->dmi.ipmi.filled == false) { - printf("IPMI module not available\n"); + more_printf("IPMI module not available\n"); return; } clear_screen(); @@ -220,7 +220,7 @@ static void show_dmi_battery(int argc __unused, char** argv __unused, struct s_hardware *hardware) { if (hardware->dmi.battery.filled == false) { - printf("battery information not found on your system, see " + more_printf("battery information not found on your system, see " "`show list' to see which module is available.\n"); return; } @@ -253,7 +253,7 @@ static void show_dmi_cpu(int argc __unused, char** argv __unused, struct s_hardware *hardware) { if (hardware->dmi.processor.filled == false) { - printf("processor information not found on your system, see " + more_printf("processor information not found on your system, see " "`show list' to see which module is available.\n"); return; } @@ -317,20 +317,20 @@ static void show_dmi_memory_bank(int argc, char** argv, bank = strtol(argv[0], (char **)NULL, 10); if (errno == ERANGE || bank < 0) { - printf("This bank number is incorrect\n"); + more_printf("This bank number is incorrect\n"); return; } if ((bank >= hardware->dmi.memory_count) || (bank < 0)) { - printf("Bank %d number doesn't exists\n", bank); + more_printf("Bank %d number doesn't exists\n", bank); return; } if (hardware->dmi.memory[bank].filled == false) { - printf("Bank %d doesn't contain any information\n", bank); + more_printf("Bank %d doesn't contain any information\n", bank); return; } - printf("Memory Bank %d\n", bank); + more_printf("Memory Bank %d\n", bank); more_printf(" Form Factor : %s\n", hardware->dmi.memory[bank].form_factor); more_printf(" Type : %s\n", hardware->dmi.memory[bank].type); @@ -365,10 +365,10 @@ void main_show_dmi(int argc __unused, char **argv __unused, detect_dmi(hardware); if (hardware->is_dmi_valid == false) { - printf("No valid DMI table found, exiting.\n"); + more_printf("No valid DMI table found, exiting.\n"); return; } - printf("DMI Table version %d.%d found\n", + more_printf("DMI Table version %d.%d found\n", hardware->dmi.dmitable.major_version, hardware->dmi.dmitable.minor_version); @@ -398,7 +398,7 @@ void show_dmi_memory_modules(int argc __unused, char** argv __unused, memset(available_dmi_commands, 0, sizeof(available_dmi_commands)); if (hardware->dmi.memory_count <= 0) { - printf("No memory module found\n"); + more_printf("No memory module found\n"); return; } @@ -417,12 +417,12 @@ void show_dmi_memory_modules(int argc __unused, char** argv __unused, if (show_free_banks == false) { if (strncmp (hardware->dmi.memory[i].size, "Free", 4)) - printf(" bank %02d : %s %s@%s\n", + more_printf(" bank %02d : %s %s@%s\n", i, hardware->dmi.memory[i].size, hardware->dmi.memory[i].type, hardware->dmi.memory[i].speed); } else { - printf(" bank %02d : %s %s@%s\n", i, + more_printf(" bank %02d : %s %s@%s\n", i, hardware->dmi.memory[i].size, hardware->dmi.memory[i].type, hardware->dmi.memory[i].speed); @@ -434,7 +434,7 @@ void show_dmi_memory_modules(int argc __unused, char** argv __unused, //printf("Type 'show bank<bank_number>' for more details.\n"); usage: - printf("show memory <clear screen? <show free banks?>>\n"); + more_printf("show memory <clear screen? <show free banks?>>\n"); return; } diff --git a/com32/hdt/hdt-cli-hdt.c b/com32/hdt/hdt-cli-hdt.c index 6e7f13da..c2a16f7e 100644 --- a/com32/hdt/hdt-cli-hdt.c +++ b/com32/hdt/hdt-cli-hdt.c @@ -54,7 +54,7 @@ static void cli_set_mode(int argc, char **argv, cli_mode_t new_mode; if (argc <= 0) { - printf("Which mode?\n"); + more_printf("Which mode?\n"); return; } @@ -100,23 +100,23 @@ static void show_cli_help(int argc __unused, char** argv __unused, find_cli_mode_descr(hdt_cli.mode, ¤t_mode); - printf("Available commands are:\n"); + more_printf("Available commands are:\n"); /* List first default modules of the mode */ if (current_mode->default_modules != NULL ) { for (j = 0; j < current_mode->default_modules->nb_modules; j++) { - printf("%s ", + more_printf("%s ", current_mode->default_modules->modules[j].name); } - printf("\n"); + more_printf("\n"); } /* List secondly the show modules of the mode */ if (current_mode->show_modules != NULL && current_mode->show_modules->nb_modules != 0) { - printf("show commands:\n"); + more_printf("show commands:\n"); for (j = 0; j < current_mode->show_modules->nb_modules; j++) { - printf("\t%s\n", + more_printf("\t%s\n", current_mode->show_modules->modules[j].name); } } @@ -124,9 +124,9 @@ static void show_cli_help(int argc __unused, char** argv __unused, /* List thirdly the set modules of the mode */ if (current_mode->set_modules != NULL && current_mode->set_modules->nb_modules != 0) { - printf("set commands:\n"); + more_printf("set commands:\n"); for (j = 0; j < current_mode->set_modules->nb_modules; j++) { - printf("\t%s\n", + more_printf("\t%s\n", current_mode->set_modules->modules[j].name); } } @@ -146,10 +146,10 @@ static void show_cli_help(int argc __unused, char** argv __unused, current_mode->default_modules, &associated_module); if (associated_module == NULL) - printf("%s ", + more_printf("%s ", hdt_mode.default_modules->modules[j].name); } - printf("\n"); + more_printf("\n"); } } diff --git a/com32/hdt/hdt-cli-pci.c b/com32/hdt/hdt-cli-pci.c index d36b9b07..a1b64c4f 100644 --- a/com32/hdt/hdt-cli-pci.c +++ b/com32/hdt/hdt-cli-pci.c @@ -56,17 +56,17 @@ static void show_pci_device(int argc, char **argv, /* Sanitize arguments */ if (argc <= 0) { - printf("show device <number>\n"); + more_printf("show device <number>\n"); return; } else pcidev = strtol(argv[0], (char **)NULL, 10); if (errno == ERANGE) { - printf("This PCI device number is incorrect\n"); + more_printf("This PCI device number is incorrect\n"); return; } if ((pcidev > hardware->nb_pci_devices) || (pcidev <= 0)) { - printf("PCI device %d doesn't exists\n", pcidev); + more_printf("PCI device %d doesn't exists\n", pcidev); return; } if (hardware->pci_ids_return_code == -ENOPCIIDS) { @@ -87,7 +87,7 @@ static void show_pci_device(int argc, char **argv, } if (pci_device == NULL) { - printf("We were enabled to find PCI device %d\n", pcidev); + more_printf("We were enabled to find PCI device %d\n", pcidev); return; } @@ -105,7 +105,7 @@ static void show_pci_device(int argc, char **argv, strlcpy(kernel_modules, "unknown", 7); clear_screen(); - printf("PCI Device %d\n", pcidev); + more_printf("PCI Device %d\n", pcidev); if (nopciids == false) { more_printf("Vendor Name : %s\n", @@ -306,7 +306,7 @@ void cli_detect_pci(struct s_hardware *hardware) } if (error == true) { char tempbuf[10]; - printf("Press enter to continue\n"); + more_printf("Press enter to continue\n"); fgets(tempbuf, sizeof(tempbuf), stdin); } } diff --git a/com32/hdt/hdt-cli.c b/com32/hdt/hdt-cli.c index 18c023d9..82b5d833 100644 --- a/com32/hdt/hdt-cli.c +++ b/com32/hdt/hdt-cli.c @@ -138,9 +138,9 @@ void set_mode(cli_mode_t mode, struct s_hardware* hardware) break; default: /* Invalid mode */ - printf("Unknown mode, please choose among:\n"); + more_printf("Unknown mode, please choose among:\n"); for (i = 0; i < MAX_MODES; i++) - printf("\t%s\n", list_modes[i]->name); + more_printf("\t%s\n", list_modes[i]->name); } } @@ -376,7 +376,7 @@ static void exec_command(char *line, find_cli_mode_descr(hdt_cli.mode, ¤t_mode); if (current_mode == NULL) { /* Shouldn't get here... */ - printf("!!! BUG: Mode '%s' unknown.\n", hdt_cli.mode); + more_printf("!!! BUG: Mode '%s' unknown.\n", hdt_cli.mode); return; } @@ -475,7 +475,7 @@ static void reset_prompt() { /* No need to display the prompt if we exit */ if (hdt_cli.mode != EXIT_MODE) { - printf("%s", hdt_cli.prompt); + more_printf("%s", hdt_cli.prompt); /* Reset the line */ memset(hdt_cli.input, '\0', MAX_LINE_SIZE); hdt_cli.cursor_pos = 0; @@ -498,7 +498,7 @@ void start_cli_mode(struct s_hardware *hardware) set_mode(HDT_MODE, hardware); - printf("Entering CLI mode\n"); + more_printf("Entering CLI mode\n"); /* Display the cursor */ fputs("\033[?25h", stdout); diff --git a/com32/hdt/hdt-common.c b/com32/hdt/hdt-common.c index 554ed3cb..bdca2121 100644 --- a/com32/hdt/hdt-common.c +++ b/com32/hdt/hdt-common.c @@ -193,7 +193,7 @@ void detect_disks(struct s_hardware *hardware) if (get_disk_params(drive, hardware->disk_info) != 0) continue; struct diskinfo *d = &hardware->disk_info[drive]; - printf + more_printf (" DISK 0x%X: %s : %s %s: sectors=%d, s/t=%d head=%d : EDD=%s\n", drive, d->aid.model, d->host_bus_type, d->interface_type, d->sectors, d->sectors_per_track, d->heads, @@ -338,19 +338,19 @@ void detect_pci(struct s_hardware *hardware) hardware->nb_pci_devices++; } - printf("PCI: %d devices detected\n", hardware->nb_pci_devices); - printf("PCI: Resolving names\n"); + more_printf("PCI: %d devices detected\n", hardware->nb_pci_devices); + more_printf("PCI: Resolving names\n"); /* Assigning product & vendor name for each device */ hardware->pci_ids_return_code = get_name_from_pci_ids(hardware->pci_domain, hardware->pciids_path); - printf("PCI: Resolving class names\n"); + more_printf("PCI: Resolving class names\n"); /* Assigning class name for each device */ hardware->pci_ids_return_code = get_class_name_from_pci_ids(hardware->pci_domain, hardware->pciids_path); - printf("PCI: Resolving module names\n"); + more_printf("PCI: Resolving module names\n"); /* Detecting which kernel module should match each device */ hardware->modules_pcimap_return_code = get_module_name_from_pci_ids(hardware->pci_domain, |