Chameleon

Chameleon Commit Details

Date:2014-10-20 20:01:13 (4 years 11 months ago)
Author:ErmaC
Commit:2411
Parents: 2410
Message:Make compile on gcc w/ errors enabled
Changes:
M/trunk/i386/config/confdata.c
M/trunk/i386/boot2/mboot.c
M/trunk/i386/libsaio/fake_efi.c
M/trunk/i386/modules/AcpiCodec/acpi_codec.c
M/trunk/i386/boot2/modules.c
M/trunk/CHANGES
M/trunk/i386/include/sys/socket.h
M/trunk/i386/libsaio/vbe.c
M/trunk/i386/libsaio/stringTable.c
M/trunk/i386/config/textbox.c

File differences

trunk/i386/libsaio/vbe.c
3434
3535
3636
37
37
3838
3939
4040
......
6666
6767
6868
69
69
7070
7171
7272
static biosBuf_t bb;
//==============================================================================
#if UNUSED
static inline void
outi (int port, int index, int val)
{
outb (port, index);
outb (port + 1, (inb (port + 1) & ~clear) | set);
}
#endif /* UNUSED */
//==============================================================================
int getVBEInfo( void * infoBlock )
trunk/i386/libsaio/stringTable.c
3636
3737
3838
39
40
3941
4042
4143
......
7072
7173
7274
73
74
7575
7676
7777
bool sysConfigValid;
#if UNUSED
/*
* Compare a string to a key with quoted characters
*/
return 0;
}
#if UNUSED
static void eatThru(char val, const char **table_p)
{
register const char *table = *table_p;
trunk/i386/libsaio/fake_efi.c
437437
438438
439439
440
440
441441
442442
443443
static const char FIRMWARE_REVISION_PROP[] = "firmware-revision";
static const char FIRMWARE_ABI_PROP[] = "firmware-abi";
static const char FIRMWARE_VENDOR_PROP[] = "firmware-vendor";
static const char FIRMWARE_ABI_32_PROP_VALUE[] = "EFI32";
//static const char FIRMWARE_ABI_32_PROP_VALUE[] = "EFI32";
static const char FIRMWARE_ABI_64_PROP_VALUE[] = "EFI64";
static const char EFI_MODE_PROP[] = "efi-mode"; //Bungo
static const char SYSTEM_ID_PROP[] = "system-id";
trunk/i386/include/sys/socket.h
514514
515515
516516
517
517518
518519
519520
......
523524
524525
525526
527
526528
527529
528530
* peer from lying about its identity. (Note that cmcred_groups[0]
* is the effective GID.)
*/
#if 0
struct cmsgcred {
pid_tcmcred_pid;/* PID of sending process */
uid_tcmcred_uid;/* real UID of sending process */
gid_tcmcred_groups[CMGROUP_MAX];/* groups */
};
#endif
#endif
#endif/* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
/* given pointer to struct cmsghdr, return pointer to data */
trunk/i386/boot2/mboot.c
1515
1616
1717
18
19
1820
1921
2022
......
6163
6264
6365
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
66
8767
8868
8969
......
344324
345325
346326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
347352
348353
349354
int multiboot_skip_partition=0;
int multiboot_skip_partition_set=0;
void boot(int biosdev);
// Global multiboot info, if using multiboot.
struct multiboot_info *gMI;
// would be on the stack which would possibly be using way too much stack.
void multiboot_to_boot(int multiboot_magic, struct multiboot_info *mi_orig)
{
uint32_t bootdevice = hi_multiboot(multiboot_magic, mi_orig);
if(bootdevice != BAD_BOOT_DEVICE)
{
// boot only returns to do a chain load.
for(;;)
{ // NOTE: boot only uses the last byte (the drive number)
common_boot(bootdevice);
if(chainbootflag)
chainLoad();
else
waitThenReload();
}
}
// Avoid returning to high-memory address which isn't valid in the segment
// we are now in.
// Calling sleep() ensures the user ought to be able to use Ctrl+Alt+Del
// because the BIOS will have interrupts on.
for(;;)
sleep(10);
// NOTE: *IF* we needed to return we'd have to fix up our return address to
// be in low memory using the same trick as below.
// However, there doesn't seem to be any point in returning to assembly
// particularly when the remaining code merely halts the processor.
hi_multiboot(multiboot_magic, mi_orig);
}
void chainLoad()
// Since we call multiboot ourselves, its return address will be correct.
// That is unless it's inlined in which case it does not matter.
uint32_t bootdevice = multiboot(multiboot_magic, mi_p);
if(bootdevice != BAD_BOOT_DEVICE)
{
// boot only returns to do a chain load.
for(;;)
{ // NOTE: boot only uses the last byte (the drive number)
boot(bootdevice);
if(chainbootflag)
chainLoad();
else
waitThenReload();
}
}
// Avoid returning to high-memory address which isn't valid in the segment
// we are now in.
// Calling sleep() ensures the user ought to be able to use Ctrl+Alt+Del
// because the BIOS will have interrupts on.
for(;;)
sleep(10);
// NOTE: *IF* we needed to return we'd have to fix up our return address to
// be in low memory using the same trick as below.
// However, there doesn't seem to be any point in returning to assembly
// particularly when the remaining code merely halts the processor.
// We're about to exit and temporaryBootArgs will no longer be valid
bootArgs = NULL;
return bootdevice;
trunk/i386/boot2/modules.c
105105
106106
107107
108
109
110
111
112
113
114
108115
109116
110117
......
121128
122129
123130
131
124132
125133
126134
......
282290
283291
284292
293
294
295
296
297
285298
286299
287300
long flags;
long time;
struct dirstuff* moduleDir = opendir("/Extra/modules/");
if(!moduleDir)
{
verbose("Warning: Unable to open modules folder at '/Extra/modules/'. Ingoring modules.\n");
return;
}
while (readdir(moduleDir, (const char**)&name, &flags, &time) >= 0) {
if(strcmp(&name[strlen(name) - sizeof("dylib")], ".dylib") == 0) {
char* tmp = malloc(strlen(name) + 1);
}
}
closedir(moduleDir);
}
//DBG("External symbol %s located at 0x%X\n", name, entry->addr);
return entry->addr;
}
else if(strcmp(entry->symbol, name + 1) == 0 && *name == '_') // Allow _strstr to bing to strstr, etc
{
//DBG("External symbol %s located at 0x%X\n", name, entry->addr);
return entry->addr;
}
else
{
entry = entry->next;
trunk/i386/config/confdata.c
1313
1414
1515
16
17
18
19
20
21
22
23
24
25
26
27
1628
1729
1830
......
101113
102114
103115
104
116
105117
106118
107119
......
118130
119131
120132
121
133
122134
123135
124136
#include <time.h>
#include <unistd.h>
char *
int_stpncpy (dst, src, len)
char *dst;
const char *src;
size_t len;
{
size_t n = strlen (src);
if (n > len)
n = len;
return strncpy (dst, src, len) + n;
}
#define LKC_DIRECT_LINK
#include "lkc.h"
char *name_ptr = name;
size_t n = min(res_rem, src - in);
res_ptr = stpncpy(res_ptr, in, n);
res_ptr = int_stpncpy(res_ptr, in, n);
if (!(res_rem -= n)) {
return res_value; /* buffer full, quit now */
}
symval = sym_get_string_value(sym);
n = min(res_rem, strlen(symval));
res_ptr = stpncpy(res_ptr, symval, n);
res_ptr = int_stpncpy(res_ptr, symval, n);
if (!(res_rem -= n)) {
return res_value; /* buffer full, quit now */
}
trunk/i386/config/textbox.c
320320
321321
322322
323
324323
325324
326325
......
329328
330329
331330
332
333331
334332
333
335334
336335
337336
*/
static void print_line(WINDOW * win, int row, int width)
{
int y, x;
char *line;
line = get_line();
waddch(win, ' ');
waddnstr(win, line, MIN(strlen(line), width - 2));
getyx(win, y, x);
/* Clear 'residue' of previous line */
#if OLD_NCURSES
getyx(win, y, x);
{
int i;
for (i = 0; i < width - x; i++)
trunk/i386/modules/AcpiCodec/acpi_codec.c
196196
197197
198198
199
200
199
200
201
202
201203
202204
203205
return entry;\
}
__RES(pss, long)
__RES(cst, int)
__RES(pss, long)
#if UNUSED
__RES(cst, int)
#endif /* UNUSED */
static ACPI_TABLE_HEADER * get_new_table_in_list(U32 *new_table_list, U32 Signature, U8 *retIndex )
{
trunk/CHANGES
1
12
23
34
- Make compile on gcc w/ errors enabled.
- Remove the '-x' option from the offending 'ld' command
- Makefile dependency missing for boot0 and boot1h
- Temp disable klibc module

Archive Download the corresponding diff file

Revision: 2411