int nb_commands=0;
char *commands[MAX_NB_AUTO_COMMANDS];
- if (debug)
+ if (!quiet)
more_printf("\nEntering Auto mode\n");
/* Protecting the auto_label from the strtok modifications */
for (int i=1;i<=nb_commands;i++) {
if (commands[i]) {
more_printf("\n");
- if (debug)
+ if (!quiet)
more_printf("> Auto mode: Executing %d/%d : '%s'\n", i, nb_commands, commands[i]);
exec_command(commands[i], hardware);
free(commands[i]);
}
}
- if (debug)
+ if (!quiet)
more_printf("\nExiting Auto mode\n");
more_printf("\n");
void detect_parameters(const int argc, const char *argv[],
struct s_hardware *hardware)
{
- /* Debug mode - make the output more verbose */
- debug = false;
+ /* Quiet mode - make the output more quiet */
+ quiet = false;
for (int i = 1; i < argc; i++) {
- if (!strncmp(argv[i], "debug", 5)) {
- debug = true;
+ if (!strncmp(argv[i], "quiet", 5)) {
+ quiet = true;
} else if (!strncmp(argv[i], "modules_pcimap=", 15)) {
strncpy(hardware->modules_pcimap_path, argv[i] + 15,
sizeof(hardware->modules_pcimap_path));
hardware->nb_pci_devices++;
}
- if (debug) {
+ if (!quiet) {
more_printf("PCI: %d devices detected\n", hardware->nb_pci_devices);
more_printf("PCI: Resolving names\n");
}
hardware->pci_ids_return_code =
get_name_from_pci_ids(hardware->pci_domain, hardware->pciids_path);
- if (debug)
+ if (!quiet)
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);
- if (debug)
+ if (!quiet)
more_printf("PCI: Resolving module names\n");
/* Detecting which kernel module should match each device using modules.pcimap*/
hardware->modules_pcimap_return_code =
/* The char that surround the list of commands */
#define AUTO_DELIMITER "'"
-bool debug;
+/* Defines if the cli is quiet*/
+bool quiet;
extern int display_line_nb;
extern bool disable_more_printf;
t_menuitem *curr;
char cmd[160];
- if (debug)
+ if (!quiet)
more_printf("Starting Menu (%d menus)\n", hdt_menu.total_menu_count);
curr = showmenus(hdt_menu.main_menu.menu);
/* When we exit the menu, do we have something to do? */
void detect_hardware(struct s_hardware *hardware)
{
- if (debug)
+ if (!quiet)
more_printf("CPU: Detecting\n");
cpu_detect(hardware);
- if (debug)
+ if (!quiet)
more_printf("DISKS: Detecting\n");
detect_disks(hardware);
- if (debug)
+ if (!quiet)
more_printf("DMI: Detecting Table\n");
if (detect_dmi(hardware) == -ENODMITABLE) {
printf("DMI: ERROR ! Table not found ! \n");
printf
("DMI: Many hardware components will not be detected ! \n");
} else {
- if (debug)
+ if (!quiet)
more_printf("DMI: Table found ! (version %u.%u)\n",
hardware->dmi.dmitable.major_version,
hardware->dmi.dmitable.minor_version);
}
- if (debug)
+ if (!quiet)
more_printf("VPD: Detecting\n");
detect_vpd(hardware);
#ifdef WITH_PCI
detect_pci(hardware);
- if (debug)
+ if (!quiet)
more_printf("PCI: %d Devices Found\n", hardware->nb_pci_devices);
#endif
- if (debug)
+ if (!quiet)
more_printf("VESA: Detecting\n");
detect_vesa(hardware);
}