diff -urN BootX 1.2.1.orig/Sources/src/miboot/miBoot_boot3.c BootX 1.2.1.suse/Sources/src/miboot/miBoot_boot3.c --- BootX 1.2.1.orig/Sources/src/miboot/miBoot_boot3.c Thu Aug 3 11:12:22 2000 +++ BootX 1.2.1.suse/Sources/src/miboot/miBoot_boot3.c Thu Aug 3 11:11:19 2000 @@ -16,7 +16,7 @@ #include "debug_text.h" #include "nr_wrapper.h" -#define VERSION "1.0a2" +#define VERSION "1.0d3" static void set_a5_world(void); static void test_paint(void); @@ -38,6 +38,7 @@ Boolean g_use_color = 1; Boolean g_debug_visible = 0; Boolean g_no_video = 0; +char runlevel = ' '; #define kPenguinNormalID 128 #define kPenguinRamDiskID 129 @@ -82,7 +83,7 @@ MoveHHi(rsrc); HLock(rsrc); - ((void (*)(dt_context*, Boolean))(*rsrc))(dct, g_no_video); + ((void (*)(dt_context*, Boolean, char))(*rsrc))(dct, g_no_video,runlevel); DisposeHandle(rsrc); } @@ -215,4 +216,16 @@ g_debug_visible = 1; if (check_one_key(keys, 0x38)) // shift g_no_video = 1; + if (check_one_key(keys, 0x01)) // key s + runlevel = 's'; + if (check_one_key(keys, 0x12)) // key 1 + runlevel = '1'; + if (check_one_key(keys, 0x13)) // key 2 + runlevel = '2'; + if (check_one_key(keys, 0x14)) // key 3 + runlevel = '3'; + if (check_one_key(keys, 0x15)) // key 4 + runlevel = '4'; + if (check_one_key(keys, 0x16)) // key 5 + runlevel = '5'; } diff -urN BootX 1.2.1.orig/Sources/src/miboot/miBoot_boot4.c BootX 1.2.1.suse/Sources/src/miboot/miBoot_boot4.c --- BootX 1.2.1.orig/Sources/src/miboot/miBoot_boot4.c Thu Aug 3 11:12:22 2000 +++ BootX 1.2.1.suse/Sources/src/miboot/miBoot_boot4.c Thu Aug 3 11:11:20 2000 @@ -49,7 +49,14 @@ #define KERNEL_XCOFF 0x02 #define KERNEL_GZIPPED 0x04 -void main(dt_context *input_context, Boolean no_video) +int mystrlen(char * str) +{ + int i; + for (i=0;str[i];i++); + return i; +} + +void main(dt_context *input_context, Boolean no_video, char runlevel) { Ptr k; UInt32 ks; @@ -63,6 +70,8 @@ static boot_ramdisk_desc_t rdesc; static boot_params_t params; static Boolean has_rd; + char* helper=NULL; + int len=0; EnterCodeResource(); @@ -98,8 +107,27 @@ DetachResource(cmd); HLock(cmd); } - params.args = *cmd; + len=mystrlen(*cmd); + dt_printf(dct, "\n***Kernel args: %s , laenge: %d\n",*cmd,len); +// newargs=NewPtr(len+sizeof(char)*3); +// memset(newargs,0,len+(sizeof(char)) *3); +// memcpy(newargs,*cmd,len); + +// newargs[len]=' '; +// newargs[len+1]=runlevel; +// newargs[len+2]='\0'; +// (*cmd)[len]=' '; + for (helper=*cmd+len-1;*helper==' ';helper--); + helper+=2; + if(*helper==' ') *helper=runlevel; +// (*cmd)[len-1]=runlevel; +// (*cmd)[len-2]=' '; + + params.args = *cmd; + +// params.args = newargs; // params.no_relocation = true; + dt_printf(dct, "\n***Kernel args: %s , leange: %d\n",params.args,mystrlen(params.args)); do_boot(&kdesc, &rdesc, ¶ms); if (cmd) DisposeHandle(cmd);