Chameleon

Chameleon Commit Details

Date:2010-09-06 09:44:00 (4 years 25 days ago)
Author:Azimutz
Commit:498
Parents: 497
Message:Fixing PatchKernel key according to Meklort pointer: http://forum.voodooprojects.org/index.php/topic,1153.msg8124.html#msg 8124 Noob learned the lesson.. i think :) Thanks
Changes:
M/branches/azimutz/Chazi/doc-azi/CHANGES.txt
M/branches/azimutz/Chazi/i386/modules/KernelPatcher/kernel_patcher.c
M/branches/azimutz/Chazi/i386/boot2/boot.c

File differences

branches/azimutz/Chazi/doc-azi/CHANGES.txt
273273
274274
275275
276
277
276
277
278278
279279
280280
---------------//---------------//---------------
- (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.
branches/azimutz/Chazi/i386/boot2/boot.c
396396
397397
398398
399
400399
401400
402401
......
667666
668667
669668
670
671
672
673
674
675
669
670
676671
677672
678673
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];
} 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);
}
}
branches/azimutz/Chazi/i386/modules/KernelPatcher/kernel_patcher.c
33
44
55
6
7
68
7
8
99
1010
1111
......
171171
172172
173173
174
174175
175176
177
178
176179
177180
178181
179182
180183
181
184
182185
183186
184187
185
188
186189
187
190
188191
189192
190193
191
192194
193195
194196
*
*/
#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"
void patch_kernel(void* kernelData, void* arg2, void* arg3, void *arg4)
{
boolpatchKernel = 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;
}
}
}

Archive Download the corresponding diff file

Revision: 498