Changeset 6c28fd79cfb1c70185df7215540e564dd061058d

Show
Ignore:
Timestamp:
11/02/09 18:53:12 (3 years ago)
Author:
Erwan Velu <erwan.velu@…>
Children:
c9d07318d415f697a873e40f933834ff0e8e949b
Parents:
aa1724e7a975430c7b8b53359e94c225622f4957, eed4119f07af14cb24ec3ae4e9678dbeb5de80de
git-committer:
Erwan Velu <erwan.velu@free.fr> / 2009-11-02T19:53:12Z+0100
Message:

Merge branch 'master' of  ssh://terminus.zytor.com//pub/git/users/erwan/hdt

Location:
com32
Files:
20 modified

Legend:

Unmodified
Added
Removed
  • com32/cmenu/libmenu/menu.c

    r397586 r512de9  
    658658    cursoron(); 
    659659    cls(); 
     660    gotoxy(ms->minrow, ms->mincol); 
    660661 
    661662    // Return user choice 
  • com32/gpllib/dmi/dmi.c

    ra1d889 rc9118b  
    445445} 
    446446 
    447 int dmi_checksum(uint8_t * buf, int len) 
     447int checksum(uint8_t * buf, int len) 
    448448{ 
    449449    uint8_t sum = 0; 
     
    482482        buf[11] << 24 | buf[10] << 16 | buf[9] << 8 | buf[8]; 
    483483 
     484    /* Version already found? */ 
    484485    if (dmi->dmitable.ver>0) return DMI_TABLE_PRESENT; 
    485486 
     
    491492     */ 
    492493    if (buf[14] != 0) { 
    493         dmi->dmitable.major_version = buf[14] >> 4; 
    494         dmi->dmitable.minor_version = buf[14] & 0x0F; 
     494        dmi->dmitable.major_version = buf[14] >> 4; 
     495        dmi->dmitable.minor_version = buf[14] & 0x0F; 
    495496    } else { 
    496         dmi->dmitable.major_version = 0; 
    497         dmi->dmitable.minor_version = 0; 
     497        dmi->dmitable.major_version = 0; 
     498        dmi->dmitable.minor_version = 0; 
    498499    } 
    499500    return DMI_TABLE_PRESENT; 
     
    503504int dmi_iterate(s_dmi * dmi) 
    504505{ 
    505     uint8_t buf[DMI_BUFFER_SIZE]; 
    506     char *p, *q; 
     506    uint8_t *p, *q; 
     507    int found = 0; 
    507508 
    508509    /* Cleaning structures */ 
     
    526527    dmi->system.filled = false; 
    527528 
    528     p = (char *)0xF0000;        /* The start address to look at the dmi table */ 
     529    p = (uint8_t *)0xF0000;     /* The start address to look at the dmi table */ 
     530    /* The anchor-string is 16-bytes aligned */ 
    529531    for (q = p; q < p + 0x10000; q += 16) { 
    530         memcpy(buf, q, 15); 
    531         if (memcmp(buf, "_SM_", 4) == 0) { 
    532                 smbios_decode(dmi,buf); 
    533         } 
    534         if (memcmp(buf, "_DMI_", 5) == 0 && dmi_checksum(buf,sizeof(buf))) { 
    535                 return legacy_decode(dmi,buf); 
    536         } 
    537     } 
     532        /* To validate the presence of SMBIOS: 
     533         * + the overall checksum must be correct 
     534         * + the intermediate anchor-string must be _DMI_ 
     535         * + the intermediate checksum must be correct 
     536         */ 
     537        if (memcmp(q, "_SM_", 4) == 0 && 
     538            checksum(q, q[0x05]) && 
     539            memcmp(q + 0x10, "_DMI_", 5)==0 && 
     540            checksum(q + 0x10, 0x0F)) { 
     541            /* Do not return, legacy_decode will need to be called 
     542             * on the intermediate structure to get the table length 
     543             * and address 
     544             */ 
     545            smbios_decode(dmi, q); 
     546        } else if (memcmp(q, "_DMI_", 5) == 0 && checksum(q, 0x0F)) { 
     547            found = 1; 
     548            legacy_decode(dmi, q); 
     549        } 
     550    } 
     551 
     552    if (found) 
     553        return DMI_TABLE_PRESENT; 
     554 
    538555    dmi->dmitable.base = 0; 
    539556    dmi->dmitable.num = 0; 
     
    651668                        else 
    652669                                sprintf(dmi->processor.status,"Unpopulated"); 
    653                         sprintf(dmi->processor.upgrade,dmi_processor_upgrade(data[0x19])); 
     670                        strcpy(dmi->processor.upgrade,dmi_processor_upgrade(data[0x19])); 
    654671                        if(h->length<0x20) break; 
    655672                        dmi_processor_cache(WORD(data+0x1A), "L1", ver,dmi->processor.cache1); 
  • com32/hdt/Makefile

    rd4849a reed411  
    3535FLOPPY_DIR              ?= floppy 
    3636PCI_IDS_FILE            ?= $(PWD)/$(FLOPPY_DIR)/pci.ids 
     37REBOOT_COM32            ?= $(com32)/modules/reboot.c32 
    3738 
    3839all: $(MODULES) $(TESTFILES) 
     
    4142        $(LD) $(LDFLAGS) -o $@ $^ 
    4243 
    43 hdt.img: hdt.c32 $(FLOPPY_DIR)/hdt.cfg $(FLOPPY_DIR)/mtools.conf $(topdir)/mtools/syslinux 
     44hdt.img: hdt.c32 $(FLOPPY_DIR)/hdt.cfg $(FLOPPY_DIR)/mtools.conf $(topdir)/mtools/syslinux $(REBOOT_COM32) 
    4445        rm -f hdt.img 
    4546        MTOOLSRC=$(PWD)/$(FLOPPY_DIR)/mtools.conf $(MFORMAT) -v HDT -f 2880 -C a: 
     
    5051        -[ -f $(MODULES_PCIMAP_FILE) ] && MTOOLSRC=$(PWD)/$(FLOPPY_DIR)/mtools.conf $(MCOPY) $(MODULES_PCIMAP_FILE) a: 
    5152        MTOOLSRC=$(PWD)/$(FLOPPY_DIR)/mtools.conf $(MCOPY) hdt.c32 a: 
     53        MTOOLSRC=$(PWD)/$(FLOPPY_DIR)/mtools.conf $(MCOPY) $(REBOOT_COM32) a: 
    5254        @ [ -f $(PCI_IDS_FILE) ] && MTOOLSRC=$(PWD)/$(FLOPPY_DIR)/mtools.conf $(MCOPY) $(PCI_IDS_FILE) a: || printf "\nThe $(FLOPPY_DIR)/pci.ids file is missing and can be downloaded from http://pciids.sourceforge.net and put in\nthe ./com32/hdt/$(FLOPPY_DIR) directory of the extracted Syslinux source.\n\n" 
    5355        MTOOLSRC=$(PWD)/$(FLOPPY_DIR)/mtools.conf $(MCOPY) $(FLOPPY_DIR)/hdt.cfg a:syslinux.cfg 
     
    6466        cp $(FLOPPY_DIR)/hdt.cfg $(ISO_DIR)/$(ISOLINUX_DIR)/isolinux.cfg 
    6567        cp hdt.c32 $(ISO_DIR)/$(ISOLINUX_DIR) 
     68        cp $(REBOOT_COM32) $(ISO_DIR)/$(ISOLINUX_DIR) 
    6669        -[ ! -f $(PCI_IDS_FILE) ] && cp /usr/share/hwdata/pci.ids $(PCI_IDS_FILE) 
    6770        -[ ! -f $(PCI_IDS_FILE) ] && cp /usr/share/pci.ids $(PCI_IDS_FILE) 
  • com32/hdt/hdt-cli-disk.c

    re9069c rdff898  
    6363        int i = nb_partitions_seen; 
    6464 
     65    reset_more_printf(); 
     66 
    6567        start = partition_offset; 
    6668        end = start + ptab->length - 1; 
     
    115117 
    116118        detect_disks(hardware); 
     119    reset_more_printf(); 
     120 
    117121        if (!hardware->disk_info[i].cbios) 
    118122                return; /* Invalid geometry */ 
     
    158162        detect_disks(hardware); 
    159163 
    160         int first_one = 0; 
     164    int first_one = 0; 
    161165        for (int drive = 0x80; drive < 0xff; drive++) { 
    162166                if (hardware->disk_info[drive - 0x80].cbios) { 
    163                         if (!first_one) { 
    164                                 first_one = 1; 
    165                         } else { 
    166                                 pause_printf(); 
    167                         } 
     167            if (!first_one) { 
     168                    first_one = 1; 
     169            } else { 
     170                    pause_printf(); 
     171            } 
    168172                        char buf[5] = ""; 
    169173                        sprintf(buf, "0x%x", drive); 
  • com32/hdt/hdt-cli-dmi.c

    ra1d889 rdff898  
    3939{ 
    4040  char available_dmi_commands[1024]; 
     41  reset_more_printf(); 
    4142  memset(available_dmi_commands, 0, sizeof(available_dmi_commands)); 
    4243 
    43   printf("Available DMI modules on your system:\n"); 
     44  more_printf("Available DMI modules on your system:\n"); 
    4445        if (hardware->dmi.base_board.filled == true) 
    45                 printf("\t%s\n", CLI_DMI_BASE_BOARD); 
     46                more_printf("\t%s\n", CLI_DMI_BASE_BOARD); 
    4647        if (hardware->dmi.battery.filled == true) 
    47                 printf("\t%s\n", CLI_DMI_BATTERY); 
     48                more_printf("\t%s\n", CLI_DMI_BATTERY); 
    4849        if (hardware->dmi.bios.filled == true) 
    49                 printf("\t%s\n", CLI_DMI_BIOS); 
     50                more_printf("\t%s\n", CLI_DMI_BIOS); 
    5051        if (hardware->dmi.chassis.filled == true) 
    51                 printf("\t%s\n", CLI_DMI_CHASSIS); 
     52                more_printf("\t%s\n", CLI_DMI_CHASSIS); 
    5253        for (int i = 0; i < hardware->dmi.memory_count; i++) { 
    5354                if (hardware->dmi.memory[i].filled == true) { 
    54                         printf("\tbank <number>\n"); 
     55                        more_printf("\tbank <number>\n"); 
    5556                        break; 
    5657                } 
     
    5859        for (int i = 0; i < hardware->dmi.memory_module_count; i++) { 
    5960                if (hardware->dmi.memory_module[i].filled == true) { 
    60                         printf("\tmodule <number>\n"); 
     61                        more_printf("\tmodule <number>\n"); 
    6162                        break; 
    6263                } 
    6364        } 
    6465        if (hardware->dmi.processor.filled == true) 
    65                 printf("\t%s\n", CLI_DMI_PROCESSOR); 
     66                more_printf("\t%s\n", CLI_DMI_PROCESSOR); 
    6667        if (hardware->dmi.system.filled == true) 
    67                 printf("\t%s\n", CLI_DMI_SYSTEM); 
     68                more_printf("\t%s\n", CLI_DMI_SYSTEM); 
    6869        if (hardware->dmi.ipmi.filled == true) 
    69                 printf("\t%s\n", CLI_DMI_IPMI); 
     70                more_printf("\t%s\n", CLI_DMI_IPMI); 
    7071        if (hardware->dmi.cache_count) 
    71                 printf("\t%s\n", CLI_DMI_CACHE); 
     72                more_printf("\t%s\n", CLI_DMI_CACHE); 
    7273        if (strlen(hardware->dmi.oem_strings)) 
    7374                more_printf("\t%s\n", CLI_DMI_OEM); 
    7475        if (hardware->dmi.hardware_security.filled) 
    75                 printf("\t%s\n", CLI_DMI_SECURITY); 
     76                more_printf("\t%s\n", CLI_DMI_SECURITY); 
    7677} 
    7778 
     
    8081{ 
    8182  if (hardware->dmi.base_board.filled == false) { 
    82     printf("base_board information not found on your system, see " 
     83    more_printf("base_board information not found on your system, see " 
    8384           "`show list' to see which module is available.\n"); 
    8485    return; 
     
    115116{ 
    116117  if (hardware->dmi.system.filled == false) { 
    117     printf("system information not found on your system, see " 
     118    more_printf("system information not found on your system, see " 
    118119           "`show list' to see which module is available.\n"); 
    119120    return; 
    120121  } 
    121   printf("System\n"); 
    122   printf(" Manufacturer : %s\n", hardware->dmi.system.manufacturer); 
    123   printf(" Product Name : %s\n", hardware->dmi.system.product_name); 
    124   printf(" Version      : %s\n", hardware->dmi.system.version); 
    125   printf(" Serial       : %s\n", hardware->dmi.system.serial); 
    126   printf(" UUID         : %s\n", hardware->dmi.system.uuid); 
    127   printf(" Wakeup Type  : %s\n", hardware->dmi.system.wakeup_type); 
    128   printf(" SKU Number   : %s\n", hardware->dmi.system.sku_number); 
    129   printf(" Family       : %s\n", hardware->dmi.system.family); 
     122  reset_more_printf(); 
     123  more_printf("System\n"); 
     124  more_printf(" Manufacturer : %s\n", hardware->dmi.system.manufacturer); 
     125  more_printf(" Product Name : %s\n", hardware->dmi.system.product_name); 
     126  more_printf(" Version      : %s\n", hardware->dmi.system.version); 
     127  more_printf(" Serial       : %s\n", hardware->dmi.system.serial); 
     128  more_printf(" UUID         : %s\n", hardware->dmi.system.uuid); 
     129  more_printf(" Wakeup Type  : %s\n", hardware->dmi.system.wakeup_type); 
     130  more_printf(" SKU Number   : %s\n", hardware->dmi.system.sku_number); 
     131  more_printf(" Family       : %s\n", hardware->dmi.system.family); 
    130132 
    131133  if (strlen(hardware->dmi.system.configuration_options)) { 
    132     printf("System Configuration Options\n"); 
    133     printf("%s\n", hardware->dmi.system.configuration_options); 
     134    more_printf("System Configuration Options\n"); 
     135    more_printf("%s\n", hardware->dmi.system.configuration_options); 
    134136  } 
    135137 
    136138  if (hardware->dmi.system.system_reset.filled) { 
    137     printf("System Reset\n"); 
    138     printf("  Status               : %s\n", 
     139    more_printf("System Reset\n"); 
     140    more_printf("  Status               : %s\n", 
    139141           (hardware->dmi.system.system_reset.status ? "Enabled" : "Disabled")); 
    140     printf("  Watchdog Timer       : %s\n", 
     142    more_printf("  Watchdog Timer       : %s\n", 
    141143           (hardware->dmi.system.system_reset.watchdog ? "Present" : "Not Present")); 
    142144    if (strlen(hardware->dmi.system.system_reset.boot_option)) 
    143       printf("  Boot Option          : %s\n", hardware->dmi.system.system_reset.boot_option); 
     145      more_printf("  Boot Option          : %s\n", hardware->dmi.system.system_reset.boot_option); 
    144146    if (strlen(hardware->dmi.system.system_reset.boot_option_on_limit)) 
    145       printf("  Boot Option On Limit : %s\n", hardware->dmi.system.system_reset.boot_option_on_limit); 
     147      more_printf("  Boot Option On Limit : %s\n", hardware->dmi.system.system_reset.boot_option_on_limit); 
    146148    if (strlen(hardware->dmi.system.system_reset.reset_count)) 
    147       printf("  Reset Count          : %s\n", hardware->dmi.system.system_reset.reset_count); 
     149      more_printf("  Reset Count          : %s\n", hardware->dmi.system.system_reset.reset_count); 
    148150    if (strlen(hardware->dmi.system.system_reset.reset_limit)) 
    149       printf("  Reset Limit          : %s\n", hardware->dmi.system.system_reset.reset_limit); 
     151      more_printf("  Reset Limit          : %s\n", hardware->dmi.system.system_reset.reset_limit); 
    150152    if (strlen(hardware->dmi.system.system_reset.timer_interval)) 
    151       printf("  Timer Interval       : %s\n", hardware->dmi.system.system_reset.timer_interval); 
     153      more_printf("  Timer Interval       : %s\n", hardware->dmi.system.system_reset.timer_interval); 
    152154    if (strlen(hardware->dmi.system.system_reset.timeout)) 
    153       printf("  Timeout              : %s\n", hardware->dmi.system.system_reset.timeout); 
    154   } 
    155  
    156   printf("System Boot Information\n"); 
    157   printf(" Status       : %s\n", hardware->dmi.system.system_boot_status); 
     155      more_printf("  Timeout              : %s\n", hardware->dmi.system.system_reset.timeout); 
     156  } 
     157 
     158  more_printf("System Boot Information\n"); 
     159  more_printf(" Status       : %s\n", hardware->dmi.system.system_boot_status); 
    158160} 
    159161 
     
    162164{ 
    163165  if (hardware->dmi.bios.filled == false) { 
    164     printf("bios information not found on your system, see " 
     166    more_printf("bios information not found on your system, see " 
    165167           "`show list' to see which module is available.\n"); 
    166168    return; 
     
    214216    return; 
    215217  } 
    216   printf("Chassis\n"); 
    217   printf(" Manufacturer       : %s\n", 
     218  reset_more_printf(); 
     219  more_printf("Chassis\n"); 
     220  more_printf(" Manufacturer       : %s\n", 
    218221        hardware->dmi.chassis.manufacturer); 
    219   printf(" Type               : %s\n", hardware->dmi.chassis.type); 
    220   printf(" Lock               : %s\n", hardware->dmi.chassis.lock); 
    221   printf(" Version            : %s\n", 
     222  more_printf(" Type               : %s\n", hardware->dmi.chassis.type); 
     223  more_printf(" Lock               : %s\n", hardware->dmi.chassis.lock); 
     224  more_printf(" Version            : %s\n", 
    222225        hardware->dmi.chassis.version); 
    223   printf(" Serial             : %s\n", hardware->dmi.chassis.serial); 
    224   printf(" Asset Tag          : %s\n", 
     226  more_printf(" Serial             : %s\n", hardware->dmi.chassis.serial); 
     227  more_printf(" Asset Tag          : %s\n", 
    225228        del_multi_spaces(hardware->dmi.chassis.asset_tag)); 
    226   printf(" Boot up state      : %s\n", 
     229  more_printf(" Boot up state      : %s\n", 
    227230        hardware->dmi.chassis.boot_up_state); 
    228   printf(" Power supply state : %s\n", 
     231  more_printf(" Power supply state : %s\n", 
    229232        hardware->dmi.chassis.power_supply_state); 
    230   printf(" Thermal state      : %s\n", 
     233  more_printf(" Thermal state      : %s\n", 
    231234        hardware->dmi.chassis.thermal_state); 
    232   printf(" Security Status    : %s\n", 
     235  more_printf(" Security Status    : %s\n", 
    233236        hardware->dmi.chassis.security_status); 
    234   printf(" OEM Information    : %s\n", 
     237  more_printf(" OEM Information    : %s\n", 
    235238        hardware->dmi.chassis.oem_information); 
    236   printf(" Height             : %u\n", hardware->dmi.chassis.height); 
    237   printf(" NB Power Cords     : %u\n", 
     239  more_printf(" Height             : %u\n", hardware->dmi.chassis.height); 
     240  more_printf(" NB Power Cords     : %u\n", 
    238241        hardware->dmi.chassis.nb_power_cords); 
    239242} 
     
    246249    return; 
    247250  } 
    248   printf("IPMI\n"); 
    249   printf(" Interface Type     : %s\n", 
     251  reset_more_printf(); 
     252  more_printf("IPMI\n"); 
     253  more_printf(" Interface Type     : %s\n", 
    250254        hardware->dmi.ipmi.interface_type); 
    251   printf(" Specification Ver. : %u.%u\n", 
     255  more_printf(" Specification Ver. : %u.%u\n", 
    252256        hardware->dmi.ipmi.major_specification_version, 
    253257        hardware->dmi.ipmi.minor_specification_version); 
    254   printf(" I2C Slave Address  : 0x%02x\n", 
     258  more_printf(" I2C Slave Address  : 0x%02x\n", 
    255259        hardware->dmi.ipmi.I2C_slave_address); 
    256   printf(" Nv Storage Address : %u\n", 
     260  more_printf(" Nv Storage Address : %u\n", 
    257261        hardware->dmi.ipmi.nv_address); 
    258262  uint32_t high = hardware->dmi.ipmi.base_address >> 32; 
    259263  uint32_t low  = hardware->dmi.ipmi.base_address & 0xFFFF; 
    260   printf(" Base Address       : %08X%08X\n", 
     264  more_printf(" Base Address       : %08X%08X\n", 
    261265        high,(low & ~1)); 
    262   printf(" IRQ                : %d\n", 
     266  more_printf(" IRQ                : %d\n", 
    263267        hardware->dmi.ipmi.irq); 
    264268} 
     
    268272{ 
    269273  if (hardware->dmi.battery.filled == false) { 
    270     printf("battery information not found on your system, see " 
     274    more_printf("battery information not found on your system, see " 
    271275           "`show list' to see which module is available.\n"); 
    272276    return; 
    273277  } 
    274   printf("Battery \n"); 
    275   printf(" Vendor             : %s\n", 
     278  reset_more_printf(); 
     279  more_printf("Battery \n"); 
     280  more_printf(" Vendor             : %s\n", 
    276281        hardware->dmi.battery.manufacturer); 
    277   printf(" Manufacture Date   : %s\n", 
     282  more_printf(" Manufacture Date   : %s\n", 
    278283        hardware->dmi.battery.manufacture_date); 
    279   printf(" Serial             : %s\n", hardware->dmi.battery.serial); 
    280   printf(" Name               : %s\n", hardware->dmi.battery.name); 
    281   printf(" Chemistry          : %s\n", 
     284  more_printf(" Serial             : %s\n", hardware->dmi.battery.serial); 
     285  more_printf(" Name               : %s\n", hardware->dmi.battery.name); 
     286  more_printf(" Chemistry          : %s\n", 
    282287        hardware->dmi.battery.chemistry); 
    283   printf(" Design Capacity    : %s\n", 
     288  more_printf(" Design Capacity    : %s\n", 
    284289        hardware->dmi.battery.design_capacity); 
    285   printf(" Design Voltage     : %s\n", 
     290  more_printf(" Design Voltage     : %s\n", 
    286291        hardware->dmi.battery.design_voltage); 
    287   printf(" SBDS               : %s\n", hardware->dmi.battery.sbds); 
    288   printf(" SBDS Manuf. Date   : %s\n", 
     292  more_printf(" SBDS               : %s\n", hardware->dmi.battery.sbds); 
     293  more_printf(" SBDS Manuf. Date   : %s\n", 
    289294        hardware->dmi.battery.sbds_manufacture_date); 
    290   printf(" SBDS Chemistry     : %s\n", 
     295  more_printf(" SBDS Chemistry     : %s\n", 
    291296        hardware->dmi.battery.sbds_chemistry); 
    292   printf(" Maximum Error      : %s\n", 
     297  more_printf(" Maximum Error      : %s\n", 
    293298        hardware->dmi.battery.maximum_error); 
    294   printf(" OEM Info           : %s\n", 
     299  more_printf(" OEM Info           : %s\n", 
    295300        hardware->dmi.battery.oem_info); 
    296301} 
     
    300305{ 
    301306  if (hardware->dmi.processor.filled == false) { 
    302     printf("processor information not found on your system, see " 
     307    more_printf("processor information not found on your system, see " 
    303308           "`show list' to see which module is available.\n"); 
    304309    return; 
     
    364369 
    365370  if (errno == ERANGE || bank < 0) { 
    366     printf("This bank number is incorrect\n"); 
     371    more_printf("This bank number is incorrect\n"); 
    367372    return; 
    368373  } 
    369374 
    370375  if ((bank >= hardware->dmi.memory_count) || (bank < 0)) { 
    371     printf("Bank %d number doesn't exists\n", bank); 
     376    more_printf("Bank %d number doesn't exist\n", bank); 
    372377    return; 
    373378  } 
    374379  if (hardware->dmi.memory[bank].filled == false) { 
    375     printf("Bank %d doesn't contain any information\n", bank); 
    376     return; 
    377   } 
    378  
    379   printf("Memory Bank %d\n", bank); 
    380   printf(" Form Factor  : %s\n", 
     380    more_printf("Bank %d doesn't contain any information\n", bank); 
     381    return; 
     382  } 
     383 
     384  reset_more_printf(); 
     385  more_printf("Memory Bank %d\n", bank); 
     386  more_printf(" Form Factor  : %s\n", 
    381387        hardware->dmi.memory[bank].form_factor); 
    382   printf(" Type         : %s\n", hardware->dmi.memory[bank].type); 
    383   printf(" Type Detail  : %s\n", 
     388  more_printf(" Type         : %s\n", hardware->dmi.memory[bank].type); 
     389  more_printf(" Type Detail  : %s\n", 
    384390        hardware->dmi.memory[bank].type_detail); 
    385   printf(" Speed        : %s\n", hardware->dmi.memory[bank].speed); 
    386   printf(" Size         : %s\n", hardware->dmi.memory[bank].size); 
    387   printf(" Device Set   : %s\n", 
     391  more_printf(" Speed        : %s\n", hardware->dmi.memory[bank].speed); 
     392  more_printf(" Size         : %s\n", hardware->dmi.memory[bank].size); 
     393  more_printf(" Device Set   : %s\n", 
    388394        hardware->dmi.memory[bank].device_set); 
    389   printf(" Device Loc.  : %s\n", 
     395  more_printf(" Device Loc.  : %s\n", 
    390396        hardware->dmi.memory[bank].device_locator); 
    391   printf(" Bank Locator : %s\n", 
     397  more_printf(" Bank Locator : %s\n", 
    392398        hardware->dmi.memory[bank].bank_locator); 
    393   printf(" Total Width  : %s\n", 
     399  more_printf(" Total Width  : %s\n", 
    394400        hardware->dmi.memory[bank].total_width); 
    395   printf(" Data Width   : %s\n", 
     401  more_printf(" Data Width   : %s\n", 
    396402        hardware->dmi.memory[bank].data_width); 
    397   printf(" Error        : %s\n", hardware->dmi.memory[bank].error); 
    398   printf(" Vendor       : %s\n", 
     403  more_printf(" Error        : %s\n", hardware->dmi.memory[bank].error); 
     404  more_printf(" Vendor       : %s\n", 
    399405        hardware->dmi.memory[bank].manufacturer); 
    400   printf(" Serial       : %s\n", hardware->dmi.memory[bank].serial); 
    401   printf(" Asset Tag    : %s\n", 
     406  more_printf(" Serial       : %s\n", hardware->dmi.memory[bank].serial); 
     407  more_printf(" Asset Tag    : %s\n", 
    402408        hardware->dmi.memory[bank].asset_tag); 
    403   printf(" Part Number  : %s\n", 
     409  more_printf(" Part Number  : %s\n", 
    404410        hardware->dmi.memory[bank].part_number); 
    405411} 
     
    409415{ 
    410416        if (!hardware->dmi.cache_count) { 
    411                 printf("cache information not found on your system, see " 
     417                more_printf("cache information not found on your system, see " 
    412418                       "`show list' to see which module is available.\n"); 
    413419                return; 
     
    417423 
    418424        if (argc != 1 || cache > hardware->dmi.cache_count) { 
    419                 printf("show cache [0-%d]\n", hardware->dmi.cache_count-1); 
     425                more_printf("show cache [0-%d]\n", hardware->dmi.cache_count-1); 
    420426                return; 
    421427        } 
     
    465471 
    466472        if (errno == ERANGE || module < 0) { 
    467                 printf("This module number is incorrect\n"); 
     473                more_printf("This module number is incorrect\n"); 
    468474                return; 
    469475        } 
    470476 
    471477        if ((module >= hardware->dmi.memory_module_count) || (module < 0)) { 
    472                 printf("Module number %d doesn't exist\n", module); 
     478                more_printf("Module number %d doesn't exist\n", module); 
    473479                return; 
    474480        } 
    475481 
    476482        if (hardware->dmi.memory_module[module].filled == false) { 
    477                 printf("Module %d doesn't contain any information\n", module); 
     483                more_printf("Module %d doesn't contain any information\n", module); 
    478484                return; 
    479485        } 
    480486 
    481         printf("Memory Module %d\n", module); 
    482         printf(" Socket Designation : %s\n", 
     487  reset_more_printf(); 
     488        more_printf("Memory Module %d\n", module); 
     489        more_printf(" Socket Designation : %s\n", 
    483490                hardware->dmi.memory_module[module].socket_designation); 
    484         printf(" Bank Connections   : %s\n", 
     491        more_printf(" Bank Connections   : %s\n", 
    485492                hardware->dmi.memory_module[module].bank_connections); 
    486         printf(" Current Speed      : %s\n", 
     493        more_printf(" Current Speed      : %s\n", 
    487494                hardware->dmi.memory_module[module].speed); 
    488         printf(" Type               : %s\n", 
     495        more_printf(" Type               : %s\n", 
    489496                hardware->dmi.memory_module[module].type); 
    490         printf(" Installed Size     : %s\n", 
     497        more_printf(" Installed Size     : %s\n", 
    491498                hardware->dmi.memory_module[module].installed_size); 
    492         printf(" Enabled Size       : %s\n", 
     499        more_printf(" Enabled Size       : %s\n", 
    493500                hardware->dmi.memory_module[module].enabled_size); 
    494         printf(" Error Status       : %s\n", 
     501        more_printf(" Error Status       : %s\n", 
    495502                hardware->dmi.memory_module[module].error_status); 
    496503} 
     
    503510 
    504511  if (hardware->is_dmi_valid == false) { 
    505     printf("No valid DMI table found, exiting.\n"); 
    506     return; 
    507   } 
    508   printf("DMI Table version %u.%u found\n", 
     512    more_printf("No valid DMI table found, exiting.\n"); 
     513    return; 
     514  } 
     515  reset_more_printf(); 
     516  more_printf("DMI Table version %u.%u found\n", 
    509517         hardware->dmi.dmitable.major_version, 
    510518         hardware->dmi.dmitable.minor_version); 
     
    537545  } 
    538546 
     547  reset_more_printf(); 
    539548  more_printf("Memory Banks\n"); 
    540549  for (int i = 0; i < hardware->dmi.memory_count; i++) { 
  • com32/hdt/hdt-cli-hdt.c

    r486ec6 r3969cd  
    5353        int i = 0; 
    5454 
     55    reset_more_printf(); 
    5556        printf("Available modes:\n"); 
    5657        while (list_modes[i]) { 
     
    7172        cli_mode_t new_mode; 
    7273 
     74    reset_more_printf(); 
    7375        if (argc <= 0) { 
    74                 printf("Which mode?\n"); 
     76                more_printf("Which mode?\n"); 
    7577                return; 
    7678        } 
     
    192194{ 
    193195        char version_string[256]; 
    194         snprintf(version_string, sizeof version_string, "%s %s", 
    195                  PRODUCT_NAME, VERSION); 
     196        snprintf(version_string, sizeof version_string, "%s %s (%s)", 
     197                 PRODUCT_NAME, VERSION, CODENAME); 
    196198        start_menu_mode(hardware, version_string); 
    197199        return; 
     
    207209        detect_dmi(hardware); 
    208210        cpu_detect(hardware); 
     211    reset_more_printf(); 
    209212        clear_screen(); 
    210213        main_show_cpu(argc, argv, hardware); 
     
    237240                   struct s_hardware *hardware __unused) 
    238241{ 
    239         printf("HDT\n"); 
    240         printf(" Product     : %s\n", PRODUCT_NAME); 
    241         printf(" Version     : %s\n", VERSION); 
    242         printf(" Author      : %s\n", AUTHOR); 
    243         printf(" Contact     : %s\n", CONTACT); 
     242    reset_more_printf(); 
     243        more_printf("HDT\n"); 
     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); 
    244249        char *contributors[NB_CONTRIBUTORS] = CONTRIBUTORS; 
    245250        for (int c = 0; c < NB_CONTRIBUTORS; c++) { 
    246                 printf(" Contributor : %s\n", contributors[c]); 
    247         } 
     251                more_printf(" Contributor    : %s\n", contributors[c]); 
     252        } 
     253} 
     254 
     255/** 
     256 * do_reboot - reboot the system 
     257 **/ 
     258static 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); 
    248266} 
    249267 
     
    265283                .name = CLI_MENU, 
    266284                .exec = goto_menu, 
     285        }, 
     286        { 
     287                .name = CLI_REBOOT, 
     288                .exec = do_reboot, 
    267289        }, 
    268290        { 
  • com32/hdt/hdt-cli-kernel.c

    rdb265a9 rdff898  
    4747 
    4848        detect_pci(hardware); 
     49    reset_more_printf(); 
    4950        more_printf("Kernel modules\n"); 
    5051 
     
    106107        if (hardware->pci_ids_return_code == -ENOPCIIDS) { 
    107108                nopciids = true; 
    108                 printf(" Missing pci.ids, we can't compute the list\n"); 
     109                more_printf(" Missing pci.ids, we can't compute the list\n"); 
    109110                return; 
    110111        } 
     
    112113        if (hardware->modules_pcimap_return_code == -ENOMODULESPCIMAP) { 
    113114                nomodulespcimap = true; 
    114                 printf 
     115                more_printf 
    115116                    (" Missing modules.pcimap, we can't compute the list\n"); 
    116117                return; 
    117118        } 
    118119 
     120    reset_more_printf(); 
    119121        for_each_pci_func(pci_device, hardware->pci_domain) { 
    120122                memset(kernel_modules, 0, sizeof kernel_modules); 
     
    141143        for (int i = 0; i < MAX_PCI_CLASSES; i++) { 
    142144                if (strlen(category_name[i]) > 1) { 
    143                         printf("%s : %s\n", category_name[i], modules[i]); 
     145                        more_printf("%s : %s\n", category_name[i], modules[i]); 
    144146                } 
    145147        } 
  • com32/hdt/hdt-cli-memory.c

    r5de3f4 rdff898  
    4242 
    4343        detect_memory_e820(map, E820MAX, &count); 
    44         printf("BIOS-provided physical RAM e820 map:\n"); 
    4544        reset_more_printf(); 
     45        more_printf("BIOS-provided physical RAM e820 map:\n"); 
    4646        for (int i = 0; i < count; i++) { 
    4747                get_type(map[i].type, type, 14); 
  • com32/hdt/hdt-cli-pci.c

    r0b19ab rdff898  
    3838{ 
    3939        cli_detect_pci(hardware); 
    40  
     40    reset_more_printf(); 
    4141        more_printf("PCI\n"); 
    4242        more_printf(" NB Devices   : %d\n", hardware->nb_pci_devices); 
     
    5757        int bus = 0, slot = 0, func = 0; 
    5858 
     59    reset_more_printf(); 
    5960        /* Sanitize arguments */ 
    6061        if (argc <= 0) { 
    61                 printf("show device <number>\n"); 
     62                more_printf("show device <number>\n"); 
    6263                return; 
    6364        } else 
     
    6566 
    6667        if (errno == ERANGE) { 
    67                 printf("This PCI device number is incorrect\n"); 
     68                more_printf("This PCI device number is incorrect\n"); 
    6869                return; 
    6970        } 
    7071        if ((pcidev > hardware->nb_pci_devices) || (pcidev <= 0)) { 
    71                 printf("PCI device %d doesn't exists\n", pcidev); 
     72                more_printf("PCI device %d doesn't exist\n", pcidev); 
    7273                return; 
    7374        } 
     
    9394 
    9495        if (pci_device == NULL) { 
    95                 printf("We were enabled to find PCI device %d\n", pcidev); 
     96                more_printf("We were enabled to find PCI device %d\n", pcidev); 
    9697                return; 
    9798        } 
     
    110111                strlcpy(kernel_modules, "unknown", 7); 
    111112 
    112         printf("PCI Device %d\n", pcidev); 
     113        more_printf("PCI Device %d\n", pcidev); 
    113114 
    114115        if (nopciids == false) { 
    115                 printf("Vendor Name   : %s\n", 
     116                more_printf("Vendor Name   : %s\n", 
    116117                            pci_device->dev_info->vendor_name); 
    117                 printf("Product Name  : %s\n", 
     118                more_printf("Product Name  : %s\n", 
    118119                            pci_device->dev_info->product_name); 
    119                 printf("Class Name    : %s\n", 
     120                more_printf("Class Name    : %s\n", 
    120121                            pci_device->dev_info->class_name); 
    121122        } 
    122123 
    123124        if (nomodulesfiles == false) { 
    124                 printf("Kernel module : %s\n", kernel_modules); 
    125         } 
    126  
    127         printf("Vendor ID     : %04x\n", pci_device->vendor); 
    128         printf("Product ID    : %04x\n", pci_device->product); 
    129         printf("SubVendor ID  : %04x\n", pci_device->sub_vendor); 
    130         printf("SubProduct ID : %04x\n", pci_device->sub_product); 
    131         printf("Class ID      : %02x.%02x.%02x\n", pci_device->class[2], 
     125                more_printf("Kernel module : %s\n", kernel_modules); 
     126        } 
     127 
     128        more_printf("Vendor ID     : %04x\n", pci_device->vendor); 
     129        more_printf("Product ID    : %04x\n", pci_device->product); 
     130        more_printf("SubVendor ID  : %04x\n", pci_device->sub_vendor); 
     131        more_printf("SubProduct ID : %04x\n", pci_device->sub_product); 
     132        more_printf("Class ID      : %02x.%02x.%02x\n", pci_device->class[2], 
    132133                    pci_device->class[1], pci_device->class[0]); 
    133         printf("Revision      : %02x\n", pci_device->revision); 
     134        more_printf("Revision      : %02x\n", pci_device->revision); 
    134135        if ((pci_device->dev_info->irq > 0) 
    135136            && (pci_device->dev_info->irq < 255)) 
    136137                more_printf("IRQ           : %0d\n", pci_device->dev_info->irq); 
    137         printf("Latency       : %0d\n", pci_device->dev_info->latency); 
    138         printf("PCI Bus       : %02d\n", bus); 
    139         printf("PCI Slot      : %02d\n", slot); 
    140         printf("PCI Func      : %02d\n", func); 
     138        more_printf("Latency       : %0d\n", pci_device->dev_info->latency); 
     139        more_printf("PCI Bus       : %02d\n", bus); 
     140        more_printf("PCI Slot      : %02d\n", slot); 
     141        more_printf("PCI Func      : %02d\n", func); 
    141142 
    142143        if (hardware->is_pxe_valid == true) { 
    143144                if ((hardware->pxe.pci_device != NULL) 
    144145                    && (hardware->pxe.pci_device == pci_device)) { 
    145                         printf("Mac Address   : %s\n", hardware->pxe.mac_addr); 
    146                         printf("PXE           : Current boot device\n"); 
     146                        more_printf("Mac Address   : %s\n", hardware->pxe.mac_addr); 
     147                        more_printf("PXE           : Current boot device\n"); 
    147148                } 
    148149        } 
     
    306307                detect_pci(hardware); 
    307308                if (hardware->pci_ids_return_code == -ENOPCIIDS) { 
    308                         printf 
     309                        more_printf 
    309310                            ("The pci.ids file is missing, device names can't be computed.\n"); 
    310                         printf("Please put one in same dir as hdt\n"); 
     311                        more_printf("Please put one in same dir as hdt\n"); 
    311312                        error = true; 
    312313                } 
    313314                if ((hardware->modules_pcimap_return_code == -ENOMODULESPCIMAP) && 
    314315                        (hardware->modules_alias_return_code == -ENOMODULESALIAS)) { 
    315                         printf 
     316                        more_printf 
    316317                            ("The modules.pcimap or modules.alias files are missing, device names can't be computed.\n"); 
    317                         printf("Please put one of them in same dir as hdt\n"); 
     318                        more_printf("Please put one of them in same dir as hdt\n"); 
    318319                        error = true; 
    319320                } 
    320321                if (error == true) { 
    321322                        char tempbuf[10]; 
    322                         printf("Press enter to continue\n"); 
     323                        more_printf("Press enter to continue\n"); 
    323324                        fgets(tempbuf, sizeof(tempbuf), stdin); 
    324325                } 
  • com32/hdt/hdt-cli-pxe.c

    ra9d9ad rdff898  
    4242        char buffer[81]; 
    4343        memset(buffer, 0, sizeof(81)); 
     44    reset_more_printf(); 
    4445        if (hardware->sv->filesystem != SYSLINUX_FS_PXELINUX) { 
    45                 printf("You are not currently using PXELINUX\n"); 
     46                more_printf("You are not currently using PXELINUX\n"); 
    4647                return; 
    4748        } 
    4849 
    4950        detect_pxe(hardware); 
    50         printf("PXE\n"); 
     51        more_printf("PXE\n"); 
    5152        if (hardware->is_pxe_valid == false) { 
    52                 printf(" No valid PXE ROM found\n"); 
     53                more_printf(" No valid PXE ROM found\n"); 
    5354                return; 
    5455        } 
    5556 
    5657        struct s_pxe *p = &hardware->pxe; 
    57         printf(" PCI device no: %d \n", p->pci_device_pos); 
     58        more_printf(" PCI device no: %d \n", p->pci_device_pos); 
    5859 
    5960        if (hardware->pci_ids_return_code == -ENOPCIIDS || 
     
    6667                         " PCI Bus pos. : %02x:%02x.%02x\n", p->pci_bus, 
    6768                         p->pci_dev, p->pci_func); 
    68                 printf(buffer); 
     69                more_printf(buffer); 
    6970        } else { 
    7071                snprintf(buffer, sizeof(buffer), " Manufacturer : %s \n", 
    7172                         p->pci_device->dev_info->vendor_name); 
    72                 printf(buffer); 
     73                more_printf(buffer); 
    7374                snprintf(buffer, sizeof(buffer), " Product      : %s \n", 
    7475                         p->pci_device->dev_info->product_name); 
    75                 printf(buffer); 
     76                more_printf(buffer); 
    7677        } 
    77         printf(" Addresses    : %d.%d.%d.%d @ %s\n", p->ip_addr[0], 
     78        more_printf(" Addresses    : %d.%d.%d.%d @ %s\n", p->ip_addr[0], 
    7879                    p->ip_addr[1], p->ip_addr[2], p->ip_addr[3], p->mac_addr); 
    7980} 
  • com32/hdt/hdt-cli-syslinux.c

    ra9d9ad rdff898  
    4040                        struct s_hardware *hardware) 
    4141{ 
    42   printf("SYSLINUX\n"); 
    43   printf(" Bootloader : %s\n", hardware->syslinux_fs); 
    44   printf(" Version    : %s\n", hardware->sv->version_string + 2); 
    45   printf(" Version    : %u\n", hardware->sv->version); 
    46   printf(" Max API    : %u\n", hardware->sv->max_api); 
    47   printf(" Copyright  : %s\n", hardware->sv->copyright_string + 1); 
     42  reset_more_printf(); 
     43  more_printf("SYSLINUX\n"); 
     44  more_printf(" Bootloader : %s\n", hardware->syslinux_fs); 
     45  more_printf(" Version    : %s\n", hardware->sv->version_string + 2); 
     46  more_printf(" Version    : %u\n", hardware->sv->version); 
     47  more_printf(" Max API    : %u\n", hardware->sv->max_api); 
     48  more_printf(" Copyright  : %s\n", hardware->sv->copyright_string + 1); 
    4849} 
    4950 
  • com32/hdt/hdt-cli-vesa.c

    ra9d9ad rdff898  
    3737                    struct s_hardware *hardware) 
    3838{ 
     39    reset_more_printf(); 
    3940        detect_vesa(hardware); 
    4041        if (hardware->is_vesa_valid == false) { 
    41                 printf("No VESA BIOS detected\n"); 
     42                more_printf("No VESA BIOS detected\n"); 
    4243                return; 
    4344        } 
    44         printf("VESA\n"); 
    45         printf(" Vesa version : %d.%d\n", hardware->vesa.major_version, 
     45        more_printf("VESA\n"); 
     46        more_printf(" Vesa version : %d.%d\n", hardware->vesa.major_version, 
    4647                    hardware->vesa.minor_version); 
    47         printf(" Vendor       : %s\n", hardware->vesa.vendor); 
    48         printf(" Product      : %s\n", hardware->vesa.product); 
    49         printf(" Product rev. : %s\n", hardware->vesa.product_revision); 
    50         printf(" Software rev.: %d\n", hardware->vesa.software_rev); 
    51         printf(" Memory (KB)  : %d\n", hardware->vesa.total_memory * 64); 
    52         printf(" Modes        : %d\n", hardware->vesa.vmi_count); 
     48        more_printf(" Vendor       : %s\n", hardware->vesa.vendor); 
     49        more_printf(" Product      : %s\n", hardware->vesa.product); 
     50        more_printf(" Product rev. : %s\n", hardware->vesa.product_revision); 
     51        more_printf(" Software rev.: %d\n", hardware->vesa.software_rev); 
     52        more_printf(" Memory (KB)  : %d\n", hardware->vesa.total_memory * 64); 
     53        more_printf(" Modes        : %d\n", hardware->vesa.vmi_count); 
    5354} 
    5455 
     
    5758{ 
    5859        detect_vesa(hardware); 
     60        reset_more_printf(); 
    5961        if (hardware->is_vesa_valid == false) { 
    60                 printf("No VESA BIOS detected\n"); 
     62                more_printf("No VESA BIOS detected\n"); 
    6163                return; 
    6264        } 
    63         reset_more_printf(); 
    64         printf(" ResH. x ResV x Bits : vga= : Vesa Mode\n"); 
    65         printf("----------------------------------------\n"); 
     65        more_printf(" ResH. x ResV x Bits : vga= : Vesa Mode\n"); 
     66        more_printf("----------------------------------------\n"); 
    6667 
    6768        for (int i = 0; i < hardware->vesa.vmi_count; i++) { 
     
    7273                 */ 
    7374                if ((mi->h_res == 0) || (mi->v_res == 0)) continue; 
    74                 printf("%5u %5u    %3u     %3d     0x%04x\n", 
     75                more_printf("%5u %5u    %3u     %3d     0x%04x\n", 
    7576                            mi->h_res, mi->v_res, mi->bpp, 
    7677                            hardware->vesa.vmi[i].mode + 0x200, 
  • com32/hdt/hdt-cli-vpd.c

    r569617 rdff898  
    4040 
    4141        if (!hardware->is_vpd_valid) { 
    42                 printf("No VPD structure detected.\n"); 
     42                more_printf("No VPD structure detected.\n"); 
    4343                return; 
    4444        } 
    4545 
    46         printf("VPD present at address : 0x%s\n", hardware->vpd.base_address); 
     46        more_printf("VPD present at address : 0x%s\n", hardware->vpd.base_address); 
    4747        if (strlen(hardware->vpd.bios_build_id) > 0) 
    4848                more_printf("Bios Build ID                 : %s\n", hardware->vpd.bios_build_id); 
  • com32/hdt/hdt-cli.h

    rf8ac66 rad501c  
    4949#define CLI_EXIT "exit" 
    5050#define CLI_HELP "help" 
     51#define CLI_REBOOT "reboot" 
    5152#define CLI_SHOW "show" 
    5253#define CLI_SET "set" 
  • com32/hdt/hdt-common.c

    r47ac91 rd98e62  
    7373        sizeof(hardware->memtest_label)); 
    7474      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); 
    7579    } 
    7680  } 
     
    134138         sizeof hardware->modules_alias_path); 
    135139  memset(hardware->memtest_label, 0, sizeof hardware->memtest_label); 
     140  memset(hardware->reboot_label, 0, sizeof hardware->reboot_label); 
    136141  strcat(hardware->pciids_path, "pci.ids"); 
    137142  strcat(hardware->modules_pcimap_path, "modules.pcimap"); 
    138143  strcat(hardware->modules_alias_path, "modules.alias"); 
    139144  strcat(hardware->memtest_label, "memtest"); 
     145  strcat(hardware->reboot_label, "reboot.c32"); 
    140146} 
    141147 
  • com32/hdt/hdt-common.h

    r47ac91 rd98e62  
    6161 
    6262#define pause_printf() do {\ 
    63         printf("--More--");\ 
    64         get_key(stdin, 0);\ 
    65         printf("\n");\ 
     63       printf("--More--");\ 
     64       get_key(stdin, 0);\ 
     65       printf("\033[2K\033[1G\033[1F\n");\ 
    6666} while (0); 
    6767 
     68/* The brokeness of that macro is that 
     69 * it assumes that __VA_ARGS__ contains 
     70 * one \n (and only one) 
     71 */ 
    6872#define more_printf(...) do {\ 
    6973 if (display_line_nb == 20) {\ 
    70    printf("\nPress any key to continue");\ 
     74   printf("\n--More--");\ 
    7175   display_line_nb=0;\ 
    7276   get_key(stdin, 0);\ 
     77   printf("\033[2K\033[1G\033[1F");\ 
    7378 }\ 
    74  printf ( __VA_ARGS__);\ 
    75  display_line_nb++; \ 
     79 printf(__VA_ARGS__);\ 
     80 display_line_nb++;\ 
    7681} while (0); 
    7782 
     
    158163  char pciids_path[255]; 
    159164  char memtest_label[255]; 
     165  char reboot_label[255]; 
    160166}; 
    161167 
  • com32/hdt/hdt-menu-about.c

    r51148f r291f05  
    4040  set_menu_pos(SUBMENU_Y, SUBMENU_X); 
    4141 
    42   snprintf(buffer, sizeof buffer, "Product     : %s", PRODUCT_NAME); 
     42  snprintf(buffer, sizeof buffer, "Product        : %s", PRODUCT_NAME); 
    4343  snprintf(statbuffer, sizeof statbuffer, "Product : %s", PRODUCT_NAME); 
    4444  add_item(buffer, statbuffer, OPT_INACTIVE, NULL, 0); 
    4545  menu->items_count++; 
    4646 
    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); 
    4949  add_item(buffer, statbuffer, OPT_INACTIVE, NULL, 0); 
    5050  menu->items_count++; 
    5151 
    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); 
    5454  add_item(buffer, statbuffer, OPT_INACTIVE, NULL, 0); 
    5555  menu->items_count++; 
    5656 
    57   snprintf(buffer, sizeof buffer, "Contact     : %s", CONTACT); 
     57  snprintf(buffer, sizeof buffer, "Contact        : %s", CONTACT); 
    5858  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); 
    5964  add_item(buffer, statbuffer, OPT_INACTIVE, NULL, 0); 
    6065  menu->items_count++; 
     
    6267  char *contributors[NB_CONTRIBUTORS] = CONTRIBUTORS; 
    6368  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]); 
    6570   snprintf(statbuffer, sizeof statbuffer, "Contributor : %s", contributors[c]); 
    6671   add_item(buffer, statbuffer, OPT_INACTIVE, NULL, 0); 
  • com32/hdt/hdt-menu.c

    raa1724 r6c28fd  
    121121  init_menusystem(version); 
    122122  set_window_size(0, 0, 25, 80); 
     123 
     124  /* Do not use inactive attributes - they make little sense for HDT */ 
     125  set_normal_attr(-1, -1, 0x17, 0x1F); 
    123126 
    124127  /* Register the menusystem handler */ 
     
    290293  add_item("<A>bout", "About Menu", OPT_SUBMENU, NULL, 
    291294     hdt_menu->about_menu.menu); 
     295  add_item("<R>eboot", "Reboot", OPT_RUN, hardware->reboot_label, 0); 
    292296  add_item("E<x>it","Exit", OPT_EXITMENU,NULL,0); 
    293297  hdt_menu->main_menu.items_count++; 
  • com32/hdt/hdt.c

    r486ec6 r291f05  
    4949  struct s_hardware hardware; 
    5050 
    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); 
    5353 
    5454  /* Opening the Syslinux console */ 
     
    6464  detect_parameters(argc, argv, &hardware); 
    6565 
     66  /* Clear the screen and reset position of the cursor */ 
     67  clear_screen(); 
     68  printf("\033[1;1H"); 
    6669 
    67   clear_screen(); 
    6870  printf("%s\n", version_string); 
    6971 
  • com32/hdt/hdt.h

    r4dc540 r291f05  
    3232#define PRODUCT_NAME "Hardware Detection Tool" 
    3333#define AUTHOR "Erwan Velu" 
     34#define CORE_DEVELOPER "Pierre-Alexandre Meyer" 
    3435#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"} 
    3840 
    3941#define ATTR_PACKED __attribute__((packed))