Index: branches/azimutz/Chazi/doc-azi/CHANGES.txt =================================================================== --- branches/azimutz/Chazi/doc-azi/CHANGES.txt (revision 497) +++ branches/azimutz/Chazi/doc-azi/CHANGES.txt (revision 498) @@ -273,8 +273,8 @@ ---------------//---------------//--------------- - (rev 462) -Change: creation of this project, replacing Chazileon as my work folder. - Ence, Chazileon is now frozen until archival and deletion. +Change: creation of this project, replacing Chazileon as my work folder; + hence, Chazileon is now frozen until archival and deletion. Motif: Chazileon (Chazi) has no svn history. Index: branches/azimutz/Chazi/i386/boot2/boot.c =================================================================== --- branches/azimutz/Chazi/i386/boot2/boot.c (revision 497) +++ branches/azimutz/Chazi/i386/boot2/boot.c (revision 498) @@ -396,7 +396,6 @@ bool tryresume; bool tryresumedefault; bool forceresume; - bool patchKernel = false; //Kpatcher - default value. // additional variable for testing alternate kernel image locations on boot helper partitions. char bootFileSpec[512]; @@ -667,12 +666,8 @@ } else { /* Won't return if successful. */ // Notify modules that ExecKernel is about to be called - getBoolForKey(kKPatcherKey, &patchKernel, &bootInfo->bootConfig); - - if (patchKernel == true) - { - execute_hook("ExecKernel", binary, NULL, NULL, NULL); - } + execute_hook("ExecKernel", binary, NULL, NULL, NULL); + ret = ExecKernel(binary); } } Index: branches/azimutz/Chazi/i386/modules/KernelPatcher/kernel_patcher.c =================================================================== --- branches/azimutz/Chazi/i386/modules/KernelPatcher/kernel_patcher.c (revision 497) +++ branches/azimutz/Chazi/i386/modules/KernelPatcher/kernel_patcher.c (revision 498) @@ -3,9 +3,9 @@ * */ +#include "boot.h" +#include "bootstruct.h" // replaces libsaio.h. //#include "libsaio.h" -#include "saio_types.h" -//--- #include "kernel_patcher.h" #include "platform.h" #include "modules.h" @@ -171,24 +171,26 @@ void patch_kernel(void* kernelData, void* arg2, void* arg3, void *arg4) { + bool patchKernel = false; //Kpatcher - default value. patchRoutine_t* entry = patches; + // check if kernel patcher is requested by user. + getBoolForKey(kKPatcherKey, &patchKernel, &bootInfo->bootConfig); int arch = determineKernelArchitecture(kernelData); locate_symbols(kernelData); - if(patches != NULL) + if (patches != NULL && patchKernel) { while(entry) { - if(entry->validArchs == KERNEL_ANY || arch == entry->validArchs) + if (entry->validArchs == KERNEL_ANY || arch == entry->validArchs) { - if(entry->patchRoutine) entry->patchRoutine(kernelData); + if (entry->patchRoutine) entry->patchRoutine(kernelData); } entry = entry->next; } - } }