Changeset 5f2c9a20039de2af5afbd7151734e3a682f19a6f

Show
Ignore:
Timestamp:
01/08/12 01:00:06 (5 months ago)
Author:
Pierre-Alexandre Meyer <pierre@…>
Children:
aba875a3022964cc9f8916abe79adfb70cb5fdbd
Parents:
7b959f267919bf03eb14435c645b74a1bda98a17, 442c60166a9165e4253fd091aba92c04c699017d
git-committer:
Pierre-Alexandre Meyer <pierre@mouraf.org> / 2012-01-08T01:00:06Z+0000
Message:

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

Location:
com32
Files:
2 added
4 modified

Legend:

Unmodified
Added
Removed
  • com32/lua/src/Makefile

    r5b726d r442c60  
    4545LIBLUA_OBJS += pci.o 
    4646LIBLUA_OBJS += vesa.o 
     47LIBLUA_OBJS += dhcp.o 
    4748 
    4849CFLAGS += -DLUA_ANSI 
  • com32/lua/src/linit.c

    r0a8f78 r442c60  
    3434  {LUA_SYSLINUXLIBNAME, luaopen_syslinux}, 
    3535  {LUA_VESALIBNAME, luaopen_vesa}, 
     36  {LUA_DHCPLIBNAME, luaopen_dhcp}, 
    3637#endif 
    3738  {NULL, NULL} 
  • com32/lua/src/lualib.h

    r0a8f78 r442c60  
    5555#define LUA_CPULIBNAME  "cpu" 
    5656LUALIB_API int (luaopen_cpu) (lua_State *L); 
     57 
     58#define LUA_DHCPLIBNAME "dhcp" 
     59LUALIB_API int (luaopen_dhcp) (lua_State *L); 
    5760#endif 
    5861 
  • com32/modules/ifcpu.c

    r88e09d r287de3  
    5050 "\n" 
    5151 "cpu_features could be:\n" 
    52  "   64        : Processor is x86_64 compatible (lm cpu flag)\n" 
    53  "   hvm       : Processor features hardware virtualization (hvm or svm cpu flag)\n" 
    54  "   multicore : Processor must be multi-core \n" 
    55  "   smp       : System must be multi-processor \n" 
    56  "   pae       : Processor features Physical Address Extension (PAE)\n" 
     52 "   64         : Processor is x86_64 compatible (lm cpu flag)\n" 
     53 "   hvm        : Processor features hardware virtualization (hvm or svm cpu flag)\n" 
     54 "   multicore  : Processor must be multi-core \n" 
     55 "   smp        : System must be multi-processor \n" 
     56 "   pae        : Processor features Physical Address Extension (PAE)\n" 
     57 "   hypervisor : Processor is running under an hypervisor\n" 
    5758 "\n" 
    5859 "if you want to match many cpu features, just separate them with a single space.\n"); 
     
    115116        } else if (!strcmp(argv[i], "64")) { 
    116117            if (debug) 
    117                 printf(" 64bit     : %s on this system\n", 
     118                printf(" 64bit      : %s on this system\n", 
    118119                       show_bool(cpu.flags.lm)); 
    119120            hardware_matches = cpu.flags.lm && hardware_matches; 
    120121        } else if (!strcmp(argv[i], "pae")) { 
    121122            if (debug) 
    122                 printf(" pae       : %s on this system\n", 
     123                printf(" pae        : %s on this system\n", 
    123124                       show_bool(cpu.flags.pae)); 
    124125            hardware_matches = cpu.flags.pae && hardware_matches; 
    125126        } else if (!strcmp(argv[i], "hvm")) { 
    126127            if (debug) 
    127                 printf(" hvm       : %s on this system\n", 
     128                printf(" hvm        : %s on this system\n", 
    128129                       show_bool((cpu.flags.vmx || cpu.flags.svm))); 
    129130            hardware_matches = (cpu.flags.vmx || cpu.flags.svm) 
     
    131132        } else if (!strcmp(argv[i], "multicore")) { 
    132133            if (debug) 
    133                 printf(" multicore : %d cores on this system\n", cpu.num_cores); 
     134                printf(" multicore  : %d cores on this system\n", cpu.num_cores); 
    134135            if (cpu.num_cores > 1) 
    135136                multicore = true; 
     
    137138        } else if (!strcmp(argv[i], "smp")) { 
    138139            if (debug) 
    139                 printf(" smp       : %s on this system\n", show_bool(cpu.flags.smp)); 
     140                printf(" smp        : %s on this system\n", show_bool(cpu.flags.smp)); 
    140141            hardware_matches = cpu.flags.smp && hardware_matches; 
     142        } else if (!strcmp(argv[i], "hypervisor")) { 
     143            if (debug) 
     144                printf(" hypervisor : %s on this system\n", show_bool(cpu.flags.hypervisor)); 
     145            hardware_matches = cpu.flags.hypervisor && hardware_matches; 
    141146        } else if (!strcmp(argv[i], "dry-run")) { 
    142147            dryrun = true;