Changeset d98e625fcbafcfffdcef3932cf6d267a8b698789

Show
Ignore:
Timestamp:
11/01/09 23:55:11 (2 years ago)
Author:
Pierre-Alexandre Meyer <pierre@…>
Children:
ad501c9ca99dad2f52af62399c3ff7da9bfe09b5
Parents:
821b545a82891ee64e407c981f6562089e9c524e
git-committer:
Pierre-Alexandre Meyer <pierre@mouraf.org> / 2009-11-01T15:55:11Z-0800
Message:

hdt: add reboot entry (MENU)

Add a reboot entry to reboot the system. Uses reboot.c32 behind the scenes.

Signed-off-by: Pierre-Alexandre Meyer <pierre@…>

Location:
com32/hdt
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • 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

    r6e20c1 rd98e62  
    163163  char pciids_path[255]; 
    164164  char memtest_label[255]; 
     165  char reboot_label[255]; 
    165166}; 
    166167 
  • com32/hdt/hdt-menu.c

    r111fe2 rd98e62  
    293293  add_item("<A>bout", "About Menu", OPT_SUBMENU, NULL, 
    294294     hdt_menu->about_menu.menu); 
     295  add_item("<R>eboot", "Reboot", OPT_RUN, hardware->reboot_label, 0); 
    295296  add_item("E<x>it","Exit", OPT_EXITMENU,NULL,0); 
    296297  hdt_menu->main_menu.items_count++;