Chameleon

Chameleon Commit Details

Date:2012-10-27 20:43:39 (6 years 7 months ago)
Author:Evan Lojewski
Commit:2094
Parents: 2093
Message:Fix module system when modules are compiled into chameleon but chameleon doesn't have module support enabled...
Changes:
M/trunk/i386/boot2/modules.c

File differences

trunk/i386/boot2/modules.c
22
33
44
5
6
7
8
9
105
116
127
138
149
1510
11
12
13
14
1615
16
1717
1818
1919
......
7575
7676
7777
78
79
80
81
82
83
84
85
86
87
88
8978
90
9179
9280
9381
......
11331121
11341122
11351123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
11361148
* Copyright 2010 Evan Lojewski. All rights reserved.
*
*/
#ifdef CONFIG_MODULES
#ifndef CONFIG_MODULE_DEBUG
#define CONFIG_MODULE_DEBUG 0
#endif
#include "boot.h"
#include "bootstruct.h"
#include "modules.h"
#include "boot_modules.h"
#include <vers.h>
#ifdef CONFIG_MODULES
#ifndef CONFIG_MODULE_DEBUG
#define CONFIG_MODULE_DEBUG 0
#endif
#if CONFIG_MODULE_DEBUG
#define DBG(x...)printf(x);
#define DBGPAUSE()getchar()
return retVal;
}
void start_built_in_module(const char* name,
const char* author,
const char* description,
UInt32 version,
UInt32 compat,
void(*start_function)(void))
{
start_function();
// Notify the module system that this module really exists, specificaly, let other module link with it
module_loaded(name, author, description, version, compat);
}
/*
* Load all modules in the /Extra/modules/ directory
* Module depencdies will be loaded first
{
return 0;
}
void register_hook_callback(const char* name, void(*callback)(void*, void*, void*, void*))
{
printf("WARNING: register_hook_callback is not supported when compiled in.\n");
pause();
}
int replace_function(const char* symbol, void* newAddress)
{
printf("WARNING: replace_functions is not supported when compiled in.\n");
pause();
return 0;
}
void start_built_in_module(const char* name,
const char* author,
const char* description,
UInt32 version,
UInt32 compat,
void(*start_function)(void))
{
start_function();
}
#endif

Archive Download the corresponding diff file

Revision: 2094