Chameleon

Chameleon Commit Details

Date:2010-01-17 16:17:39 (14 years 2 months ago)
Author:JrCs
Commit:21
Parents: 20
Message:Using the ISO C99 standard 'bool' type instead of our own BOOL type.
Changes:
M/branches/JrCs/i386/libsaio/stringTable.c
M/branches/JrCs/i386/libsaio/sys.c
M/branches/JrCs/i386/libsaio/load.c
M/branches/JrCs/i386/libsaio/ntfs.h
M/branches/JrCs/i386/libsaio/hfs.c
M/branches/JrCs/i386/libsaio/ext2fs.h
M/branches/JrCs/i386/libsaio/biosfn.c
M/branches/JrCs/i386/libsaio/saio_types.h
M/branches/JrCs/i386/libsaio/hfs.h
M/branches/JrCs/i386/boot2/gui.c
M/branches/JrCs/i386/libsaio/usb.c
M/branches/JrCs/i386/libsaio/disk.c
M/branches/JrCs/i386/libsaio/pci_setup.c
M/branches/JrCs/i386/boot2/gui.h
M/branches/JrCs/i386/libsaio/saio_internal.h
M/branches/JrCs/i386/boot2/ramdisk.c
M/branches/JrCs/i386/boot2/options.c
M/branches/JrCs/i386/libsaio/console.c
M/branches/JrCs/i386/boot2/ramdisk.h
M/branches/JrCs/i386/libsaio/smbios_patcher.c
M/branches/JrCs/i386/libsaio/dsdt_patcher.c
M/branches/JrCs/i386/boot2/boot.c
M/branches/JrCs/i386/libsaio/ntfs.c
M/branches/JrCs/i386/libsaio/nvidia.c
M/branches/JrCs/i386/libsaio/ext2fs.c
M/branches/JrCs/i386/boot2/boot.h

File differences

branches/JrCs/i386/libsaio/console.c
4949
5050
5151
52
53
52
53
5454
5555
5656
extern intvprf(const char * fmt, va_list ap);
BOOL gVerboseMode;
BOOL gErrors;
bool gVerboseMode;
bool gErrors;
/*
* write one character to console
branches/JrCs/i386/libsaio/ext2fs.c
1313
1414
1515
16
16
1717
1818
1919
......
3838
3939
4040
41
41
#define EX2ProbeSize2048
BOOL EX2Probe (const void *buf)
bool EX2Probe (const void *buf)
{
return (OSReadLittleInt16(buf+0x438,0)==0xEF53);
}
str[strMaxLen]=0;
strncpy (str, buf+0x478, min (strMaxLen, 16));
free (buf);
}
}
branches/JrCs/i386/libsaio/hfs.c
125125
126126
127127
128
128
129129
130130
131131
free(ih);
}
BOOL
bool
HFSProbe (const void *buf)
{
const HFSMasterDirectoryBlock *mdb;
branches/JrCs/i386/libsaio/ext2fs.h
77
88
99
10
10
1111
*
*/
extern BOOL EX2Probe (const void *buf);
extern bool EX2Probe (const void *buf);
extern void EX2GetDescription(CICell ih, char *str, long strMaxLen);
branches/JrCs/i386/libsaio/hfs.h
3030
3131
3232
33
33
extern long HFSGetFileBlock(CICell ih, char *str, unsigned long long *firstBlock);
extern long HFSGetUUID(CICell ih, char *uuidStr);
extern void HFSFree(CICell ih);
extern BOOL HFSProbe (const void *buf);
extern bool HFSProbe (const void *buf);
branches/JrCs/i386/libsaio/smbios_patcher.c
297297
298298
299299
300
300
301301
302302
303303
......
438438
439439
440440
441
441
442442
443443
444444
int origsmbiosnum=0;
int i, j;
int tablespresent[256];
BOOL do_auto=1;
bool do_auto=1;
getBoolForKey("SMBIOSdefaults",&do_auto,&bootInfo->bootConfig);
uint16_t nexthandle=0;
int i, j;
int tablespresent[256];
BOOL do_auto=1;
bool do_auto=1;
getBoolForKey("SMBIOSdefaults",&do_auto,&bootInfo->bootConfig);
branches/JrCs/i386/libsaio/usb.c
2929
3030
3131
32
33
32
33
3434
3535
3636
uint8_teecp;
uint8_tlegacy[8];
BOOL isOwnershipConflict;
BOOL alwaysHardBIOSReset;
bool isOwnershipConflict;
bool alwaysHardBIOSReset;
if (!getBoolForKey("EHCIhard", &alwaysHardBIOSReset, &bootInfo->bootConfig))
alwaysHardBIOSReset = 1;
branches/JrCs/i386/libsaio/dsdt_patcher.c
124124
125125
126126
127
128
127
128
129129
130130
131131
......
224224
225225
226226
227
227
228228
229229
230230
{
struct acpi_2_fadt *fadt_mod;
BOOL fadt_rev2_needed = NO;
BOOL fix_restart;
bool fadt_rev2_needed = NO;
bool fix_restart;
// Restart Fix
if (Platform.CPU.Vendor == 0x756E6547) {/* Intel */
DBG("New DSDT Loaded in memory\n");
{
BOOL tmp;
bool tmp;
drop_ssdt=getBoolForKey("DropSSDT",&tmp, &bootInfo->bootConfig)&&tmp;
}
branches/JrCs/i386/libsaio/ntfs.c
295295
296296
297297
298
298
299299
300
300
301301
302302
303303
return;
}
BOOL NTFSProbe(const void * buffer)
bool NTFSProbe(const void * buffer)
{
BOOL result = FALSE;
bool result = FALSE;
const struct bootfile* part_bootfile = buffer;// NTFS boot sector structure
branches/JrCs/i386/libsaio/nvidia.c
728728
729729
730730
731
731
732732
733733
734734
devprop_add_value(device, "model", (uint8_t*)model, (strlen(model) + 1));
devprop_add_value(device, "rom-revision", (uint8_t*)biosVersion, (strlen(biosVersion) + 1));
BOOL set_vbios_prop = false;
bool set_vbios_prop = false;
getBoolForKey("VBIOS", &set_vbios_prop, &bootInfo->bootConfig);
if (set_vbios_prop)
devprop_add_value(device, "vbios", rom, (nvBiosOveride > 0) ? nvBiosOveride : (rom[2] * 512));
branches/JrCs/i386/libsaio/sys.c
111111
112112
113113
114
114
115115
116116
117117
......
700700
701701
702702
703
704
705
703
704
705
706706
707707
708708
// zef - ramdisk variables
extern BVRef gRAMDiskVolume;
extern BOOL gRAMDiskBTAliased;
extern bool gRAMDiskBTAliased;
//static BVRef getBootVolumeRef( const char * path, const char ** outPath );
static BVRef newBootVolumeRef( int biosdev, int partno );
BVRef selectBootVolume( BVRef chain )
{
BOOL filteredChain = FALSE;
BOOL foundPrimary = FALSE;
BVRef bvr, bvr1 = 0, bvr2 = 0;
bool filteredChain = FALSE;
bool foundPrimary = FALSE;
BVRef bvr, bvr1 = 0, bvr2 = 0;
if (chain->filtered) filteredChain = TRUE;
branches/JrCs/i386/libsaio/load.c
3838
3939
4040
41
41
4242
4343
4444
......
250250
251251
252252
253
253
254254
255255
256256
static unsigned long gBinaryAddress;
BOOL gHaveKernelCache;
bool gHaveKernelCache;
cpu_type_t archCpuType=CPU_TYPE_I386;
// Public Functions
}
if (vmsize && (strcmp(segname, "__PRELINK") == 0))
gHaveKernelCache = 1;
gHaveKernelCache = true;
// Copy from file load area.
if (vmsize>0 && filesize>0)
branches/JrCs/i386/libsaio/ntfs.h
2121
2222
2323
24
24
2525
*/
extern void NTFSGetDescription(CICell ih, char *str, long strMaxLen);
extern BOOL NTFSProbe (const void *buf);
extern bool NTFSProbe (const void *buf);
branches/JrCs/i386/libsaio/disk.c
218218
219219
220220
221
221
222222
223223
224224
......
16781678
16791679
16801680
1681
1681
16821682
16831683
16841684
// Return:
// 0 on success, or an error code from INT13/F2 or INT13/F42 BIOS call.
static BOOL cache_valid = FALSE;
static bool cache_valid = FALSE;
static int Biosread( int biosdev, unsigned long long secno )
{
//==========================================================================
void getBootVolumeDescription( BVRef bvr, char * str, long strMaxLen, BOOL verbose )
void getBootVolumeDescription( BVRef bvr, char * str, long strMaxLen, bool verbose )
{
unsigned char type = (unsigned char) bvr->part_type;
char *p;
branches/JrCs/i386/libsaio/pci_setup.c
1212
1313
1414
15
15
1616
1717
1818
void setup_pci_devs(pci_dt_t *pci_dt)
{
char *devicepath;
BOOL do_eth_devprop, do_gfx_devprop, fix_ehci, fix_uhci, fix_usb, do_enable_hpet;
bool do_eth_devprop, do_gfx_devprop, fix_ehci, fix_uhci, fix_usb, do_enable_hpet;
pci_dt_t *current = pci_dt;
do_eth_devprop = do_gfx_devprop = fix_ehci = fix_uhci = fix_usb = do_enable_hpet = false;
branches/JrCs/i386/libsaio/stringTable.c
8181
8282
8383
84
84
8585
8686
8787
......
9797
9898
9999
100
100
101101
102102
103103
......
198198
199199
200200
201
201
202202
203203
204204
......
308308
309309
310310
311
311
312312
313313
314314
315
315
316316
317317
318318
......
342342
343343
344344
345
345
346346
347347
348348
......
358358
359359
360360
361
361
362362
363363
364364
365
365
366366
367367
368368
......
397397
398398
399399
400
400
401401
402402
403403
404404
405405
406406
407
408
407
408
409409
410410
411411
......
459459
460460
461461
462
462
463463
464464
465465
......
476476
477477
478478
479
479
480480
481481
482482
483
483
484484
485485
486486
......
729729
730730
731731
732
732
733733
734734
735735
static void eatThru(char val, const char **table_p)
{
register const char *table = *table_p;
register BOOL found = NO;
register bool found = NO;
while (*table && !found)
{
/* Remove key and its associated value from the table. */
BOOL
bool
removeKeyFromTable(const char *key, char *table)
{
register int len;
}
BOOL getValueForConfigTableKey(config_file_t *config, const char *key, const char **val, int *size)
bool getValueForConfigTableKey(config_file_t *config, const char *key, const char **val, int *size)
{
if (config->dictionary != 0 ) {
// Look up key in XML dictionary
return line;
}
BOOL getValueForBootKey(const char *line, const char *match, const char **matchval, int *len)
bool getValueForBootKey(const char *line, const char *match, const char **matchval, int *len)
{
const char *key, *value;
int key_len, value_len;
BOOL retval = NO;
bool retval = NO;
while (*line) {
/* look for keyword or argument */
* The boolean value of the key is stored in 'val'.
*/
BOOL getBoolForKey( const char *key, BOOL *result_val, config_file_t *config )
bool getBoolForKey( const char *key, bool *result_val, config_file_t *config )
{
const char *key_val;
int size;
return NO;
}
BOOL getIntForKey( const char *key, int *value, config_file_t *config )
bool getIntForKey( const char *key, int *value, config_file_t *config )
{
const char *val;
int size, sum;
BOOL negative = NO;
bool negative = NO;
if (getValueForKey(key, &val, &size, config))
{
*
*/
BOOL getDimensionForKey( const char *key, unsigned int *value, config_file_t *config, unsigned int dimension_max, unsigned int object_size )
bool getDimensionForKey( const char *key, unsigned int *value, config_file_t *config, unsigned int dimension_max, unsigned int object_size )
{
const char *val;
int size = 0;
int sum = 0;
BOOL negative = NO;
BOOL percentage = NO;
bool negative = NO;
bool percentage = NO;
if (getValueForKey(key, &val, &size, config))
{
*get color value from plist format #RRGGBB
*/
BOOL getColorForKey( const char *key, unsigned int *value, config_file_t *config )
bool getColorForKey( const char *key, unsigned int *value, config_file_t *config )
{
const char *val;
int size;
return NO;
}
BOOL getValueForKey( const char *key, const char **val, int *size, config_file_t *config )
bool getValueForKey( const char *key, const char **val, int *size, config_file_t *config )
{
const char *overrideVal;
int overrideSize;
BOOL override, ret;
bool override, ret;
if (getValueForBootKey(bootArgs->CommandLine, key, val, size))
return YES;
char * ptr = *argPtr;
const char * strStart;
int len = 0;
BOOL isQuoted = FALSE;
bool isQuoted = FALSE;
*val = '\0';
branches/JrCs/i386/libsaio/biosfn.c
770770
771771
772772
773
773
774774
775775
776776
777777
778
779
778
779
780780
781781
782782
#endif /* APM_SUPPORT */
#ifdef EISA_SUPPORT
BOOL
bool
eisa_present(
void
)
{
static BOOL checked;
static BOOL isEISA;
static bool checked;
static bool isEISA;
if (!checked) {
if (strncmp((char *)0xfffd9, "EISA", 4) == 0)
branches/JrCs/i386/libsaio/saio_types.h
3131
3232
3333
34
3435
3536
3637
......
3839
3940
4041
41
42
43
42
43
4444
4545
4646
......
6868
6969
7070
71
71
7272
7373
7474
......
190190
191191
192192
193
194
193
194
195195
196196
197197
#include "bios.h"
#include "nbp_cmd.h"
#include <pexpert/i386/boot.h>
#include <stdbool.h>
#if DEBUG
#define DEBUG_DISK(x) printf x
#define DEBUG_DISK(x)
#endif
typedef char BOOL;
#define NO 0
#define YES 1
#define NO (bool)0
#define YES (bool)1
typedef unsigned long entry_t;
typedef struct {
charplist[4096];// buffer for plist
TagPtrdictionary;// buffer for xml dictionary
BOOL canOverride; // flag to mark a dictionary can be overriden
bool canOverride; // flag to mark a dictionary can be overriden
} config_file_t;
/*
uint32_t modTime;
char label[BVSTRLEN]; /* partition volume label */
char altlabel[BVSTRLEN]; /* partition volume label */
BOOL filtered; /* newFilteredBVChain() will set to TRUE */
BOOL visible; /* will shown in the device list */
bool filtered; /* newFilteredBVChain() will set to TRUE */
bool visible; /* will shown in the device list */
};
enum {
branches/JrCs/i386/libsaio/saio_internal.h
3939
4040
4141
42
42
4343
4444
4545
......
8686
8787
8888
89
90
89
90
9191
9292
9393
......
123123
124124
125125
126
126
127127
128128
129129
......
144144
145145
146146
147
148
147
148
149149
150150
151
152
153
154
155
156
151
152
153
154
155
156
157157
158158
159159
......
193193
194194
195195
196
196
197197
198198
199199
/* biosfn.c */
#ifdef EISA_SUPPORT
extern BOOL eisa_present(void);
extern bool eisa_present(void);
#endif
extern int bgetc(void);
extern int biosread(int dev, int cyl, int head, int sec, int num);
long length, long cache);
/* console.c */
extern BOOL gVerboseMode;
extern BOOL gErrors;
extern bool gVerboseMode;
extern bool gErrors;
extern void putchar(int ch);
extern int getchar(void);
extern int printf(const char *format, ...);
u_int16_t *ucslen, u_int32_t bufsize, int byte_order );
/* load.c */
extern char gHaveKernelCache;
extern bool gHaveKernelCache;
extern long ThinFatFile(void **binary, unsigned long *length);
extern long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize);
/* stringTable.c */
extern char * newStringFromList(char **list, int *size);
extern int stringLength(const char *table, int compress);
extern BOOL getValueForConfigTableKey(config_file_t *config, const char *key, const char **val, int *size);
extern BOOL removeKeyFromTable(const char *key, char *table);
extern bool getValueForConfigTableKey(config_file_t *config, const char *key, const char **val, int *size);
extern bool removeKeyFromTable(const char *key, char *table);
extern char * newStringForStringTableKey(config_file_t *config, char *key);
extern char * newStringForKey(char *key, config_file_t *configBuff);
extern BOOL getValueForBootKey(const char *line, const char *match, const char **matchval, int *len);
extern BOOL getValueForKey(const char *key, const char **val, int *size, config_file_t *configBuff);
extern BOOL getBoolForKey(const char *key, BOOL *val, config_file_t *configBuff);
extern BOOL getIntForKey(const char *key, int *val, config_file_t *configBuff);
extern BOOL getColorForKey(const char *key, unsigned int *val, config_file_t *configBuff);
extern BOOL getDimensionForKey( const char *key, unsigned int *value, config_file_t *config, unsigned int dimension_max, unsigned int object_size );
extern bool getValueForBootKey(const char *line, const char *match, const char **matchval, int *len);
extern bool getValueForKey(const char *key, const char **val, int *size, config_file_t *configBuff);
extern bool getBoolForKey(const char *key, bool *val, config_file_t *configBuff);
extern bool getIntForKey(const char *key, int *val, config_file_t *configBuff);
extern bool getColorForKey(const char *key, unsigned int *val, config_file_t *configBuff);
extern bool getDimensionForKey( const char *key, unsigned int *value, config_file_t *config, unsigned int dimension_max, unsigned int object_size );
extern int loadConfigFile(const char *configFile, config_file_t *configBuff);
extern int loadSystemConfig(config_file_t *configBuff);
extern int loadHelperConfig(config_file_t *configBuff);
extern void scanBootVolumes(int biosdev, int *count);
extern void scanDisks(int biosdev, int *count);
extern BVRef selectBootVolume(BVRef chain);
extern void getBootVolumeDescription(BVRef bvr, char *str, long strMaxLen, BOOL verbose);
extern void getBootVolumeDescription(BVRef bvr, char *str, long strMaxLen, bool verbose);
extern void setRootVolume(BVRef volume);
extern void setBootGlobals(BVRef chain);
branches/JrCs/i386/boot2/ramdisk.h
1818
1919
2020
21
21
2222
23
23
2424
2525
2626
2727
28
28
//
extern BVRef gRAMDiskVolume;
extern BOOL gRAMDiskBTAliased;
extern bool gRAMDiskBTAliased;
extern void setRAMDiskBTHook(BOOL mode);
extern void setRAMDiskBTHook(bool mode);
extern int mountRAMDisk(const char * param);
extern void processRAMDiskCommand(char ** argPtr, const char * cmd);
extern int loadPrebootRAMDisk();
#endif /* !__BOOT_RAMDISK_H */
#endif /* !__BOOT_RAMDISK_H */
branches/JrCs/i386/boot2/boot.c
5959
6060
6161
62
62
6363
6464
6565
6666
6767
6868
69
70
69
70
7171
7272
7373
......
7676
7777
7878
79
79
8080
8181
8282
......
8484
8585
8686
87
87
8888
8989
9090
......
182182
183183
184184
185
185
186186
187187
188188
......
254254
255255
256256
257
258
259
260
257
258
259
260
261261
262262
263263
......
374374
375375
376376
377
378
379
377
378
379
380380
381381
382382
#include "gui.h"
long gBootMode; /* defaults to 0 == kBootModeNormal */
BOOL gOverrideKernel;
bool gOverrideKernel;
static char gBootKernelCacheFile[512];
static char gCacheNameAdler[64 + 256];
char *gPlatformName = gCacheNameAdler;
char gRootDevice[512];
char gMKextName[512];
char gMacOSVersion[8];
BOOL gEnableCDROMRescan;
BOOL gScanSingleDrive;
bool gEnableCDROMRescan;
bool gScanSingleDrive;
int bvCount = 0;
//intmenucount = 0;
BVRef bvr;
BVRef menuBVR;
BVRef bvChain;
BOOL useGUI = TRUE;
bool useGUI = true;
//static void selectBiosDevice(void);
unsigned long Adler32(unsigned char *buffer, long length);
static BOOL gUnloadPXEOnExit = 0;
static bool gUnloadPXEOnExit = false;
/*
* How long to wait (in seconds) to load the
}
}
BOOL dummyVal;
bool dummyVal;
if (getBoolForKey(kWaitForKeypressKey, &dummyVal, &bootInfo->bootConfig) && dummyVal)
{
int status;
char *bootFile;
unsigned long adler32;
BOOL quiet;
BOOL firstRun = YES;
BOOL instantMenu;
BOOL rescanPrompt;
bool quiet;
bool firstRun = YES;
bool instantMenu;
bool rescanPrompt;
unsigned int allowBVFlags = kBVFlagSystemVolume|kBVFlagForeignBoot;
unsigned int denyBVFlags = kBVFlagEFISystem;
long flags, cachetime, kerneltime, exttime, sleeptime, time;
int ret = -1;
void *binary = (void *)kLoadAddr;
BOOL tryresume;
BOOL tryresumedefault;
BOOL forceresume;
bool tryresume;
bool tryresumedefault;
bool forceresume;
config_file_t systemVersion;// system.plist of booting partition
branches/JrCs/i386/boot2/boot.h
8383
8484
8585
86
86
8787
8888
89
89
9090
9191
9292
93
94
95
93
94
95
9696
9797
9898
......
150150
151151
152152
153
153
154154
155155
156
156
157157
158158
159159
*/
extern int gBIOSDev;
extern long gBootMode;
extern BOOL sysConfigValid;
extern bool sysConfigValid;
extern char bootBanner[];
extern char bootPrompt[];
extern BOOL gOverrideKernel;
extern bool gOverrideKernel;
extern char *gPlatformName;
extern char gMKextName[];
extern char gRootDevice[];
extern BOOL gEnableCDROMRescan;
extern BOOL gScanSingleDrive;
extern BOOL useGUI;
extern bool gEnableCDROMRescan;
extern bool gScanSingleDrive;
extern bool useGUI;
// Boot Modes
enum {
/*
* options.c
*/
extern int getBootOptions(BOOL firstRun);
extern int getBootOptions(bool firstRun);
extern int processBootOptions();
extern int selectAlternateBootDevice(int bootdevice);
extern BOOL promptForRescanOption(void);
extern bool promptForRescanOption(void);
void showHelp();
void showTextFile();
branches/JrCs/i386/boot2/gui.c
143143
144144
145145
146
146
147147
148148
149149
150150
151
151
152152
153153
154154
......
245245
246246
247247
248
248
249249
250
250
251251
252252
253253
......
11911191
11921192
11931193
1194
1194
11951195
11961196
11971197
......
16821682
16831683
16841684
1685
1685
16861686
16871687
16881688
......
17131713
17141714
17151715
1716
1716
17171717
17181718
17191719
......
17851785
17861786
17871787
1788
1788
17891789
17901790
17911791
int loadGraphics();
void makeRoundedCorners(pixmap_t *p);
BOOL testForQemu();
bool testForQemu();
int infoMenuSelection = 0;
int infoMenuItemsCount = sizeof(infoMenuItems)/sizeof(infoMenuItems[0]);
BOOL infoMenuNativeBoot = 0;
bool infoMenuNativeBoot = false;
unsigned long screen_params[4];// here we store the used screen resolution
memcpy( gui.backbuffer->pixels, gui.screen.pixmap->pixels, gui.backbuffer->width * gui.backbuffer->height * 4 );
}
void loadThemeValues(config_file_t *theme, BOOL overide)
void loadThemeValues(config_file_t *theme, bool overide)
{
BOOL themeEnabled;
bool themeEnabled;
if ( (getBoolForKey("Enabled", &themeEnabled, theme ) ) || ( overide ) )
{
int start = 0, end = 0, count = 0, space = 0;
BOOL monospaced = NO;
bool monospaced = NO;
font->height = data->image->height;
uint8_t *bootImageData = NULL;
BOOL usePngImage = YES;
bool usePngImage = YES;
//==========================================================================
// loadBootGraphics
int pos;
int length;
const char *dummyVal;
BOOL legacy_logo;
bool legacy_logo;
uint16_t x, y;
if (getBoolForKey("Legacy Logo", &legacy_logo, &bootInfo->bootConfig) && legacy_logo)
return;
}
BOOL testForQemu()
bool testForQemu()
{
char *buffer = getVBEInfoString();
char qemutext[] = "Bochs/Plex86";
branches/JrCs/i386/boot2/gui.h
5757
5858
5959
60
61
60
61
6262
6363
6464
......
9595
9696
9797
98
98
9999
100100
101101
......
121121
122122
123123
124
125
124
125
126126
127127
128128
......
161161
162162
163163
164
164
typedef struct {
position_t pos;
char *text;
BOOL enabled;
BOOL expandable;
bool enabled;
bool expandable;
} menuitem_t;
/*
uint32_tfgcolor;// Foreground color AARRGGBB
uint32_tfont_small_color;// Color for small font AARRGGBB
uint32_tfont_console_color;// Color for consle font AARRGGBB
BOOLdraw;// Draw flag
booldraw;// Draw flag
} window_t;
/*
window_tdebug;// Debug
BOOLinitialised;// Initialised
BOOLredraw;// Redraw flag
boolinitialised;// Initialised
boolredraw;// Redraw flag
} gui_t;
void drawStr(char *ch, font_t *font, pixmap_t *blendInto, position_t p);
void drawStrCenteredAt(char *ch, font_t *font, pixmap_t *blendInto, position_t p);
#endif /* !__BOOT2_GUI_H */
#endif /* !__BOOT2_GUI_H */
branches/JrCs/i386/boot2/ramdisk.c
1313
1414
1515
16
16
1717
1818
1919
......
121121
122122
123123
124
124
125125
126126
127127
......
224224
225225
226226
227
227
// gRAMDiskVolume holds the bvr for the mounted ramdisk image.
BVRef gRAMDiskVolume = NULL;
BOOL gRAMDiskBTAliased = 0;
bool gRAMDiskBTAliased = 0;
char gRAMDiskFile[512];
void umountRAMDisk()
return error;
}
void setRAMDiskBTHook(BOOL mode)
void setRAMDiskBTHook(bool mode)
{
gRAMDiskBTAliased = mode;
if (mode == 1)
getc();
setActiveDisplayPage(0);
}
}
}
branches/JrCs/i386/boot2/options.c
8282
8383
8484
85
85
8686
87
87
8888
8989
9090
......
191191
192192
193193
194
194
195195
196196
197197
......
656656
657657
658658
659
659
660660
661661
662662
......
665665
666666
667667
668
668
669669
670670
671671
......
876876
877877
878878
879
879
880880
881881
882882
......
11081108
11091109
11101110
1111
1111
11121112
11131113
11141114
......
11381138
11391139
11401140
1141
1141
11421142
11431143
11441144
......
11511151
11521152
11531153
1154
1154
11551155
11561156
11571157
......
11831183
11841184
11851185
1186
1186
11871187
11881188
11891189
......
15711571
15721572
15731573
1574
1574
15751575
15761576
1577
1577
15781578
15791579
15801580
......
15871587
15881588
15891589
1590
1590
* characters was F8.
*/
static BOOL flushKeyboardBuffer()
static bool flushKeyboardBuffer()
{
BOOL status = FALSE;
bool status = FALSE;
while ( readKeyboardStatus() ) {
if (bgetc() == 0x4200) status = TRUE;
//==========================================================================
static void showBootPrompt( int row, BOOL visible )
static void showBootPrompt( int row, bool visible )
{
extern char bootPrompt[];
extern char bootRescanPrompt[];
extern void lspci(const char *booterParam);
int
getBootOptions(BOOL firstRun)
getBootOptions(bool firstRun)
{
int i;
int key;
int bvCount;
BVRef bvr;
BVRef menuBVR;
BOOL showPrompt, newShowPrompt, isCDROM;
bool showPrompt, newShowPrompt, isCDROM;
// Initialize default menu selection entry.
gBootVolume = menuBVR = selectBootVolume(bvChain);
if ( ! ( gBootMode & kBootModeQuiet ) )
{
BOOL showBootBanner = YES;
bool showBootBanner = YES;
// Check if "Boot Banner"=N switch is present in config file.
getBoolForKey( kBootBannerKey, &showBootBanner, &bootInfo->bootConfig);
extern unsigned char chainbootdev;
extern unsigned char chainbootflag;
BOOL
bool
copyArgument(const char *argName, const char *val, int cnt, char **argP, int *cntRemainingP)
{
int argLen = argName ? strlen(argName) : 0;
//
// Returns TRUE if an argument was copied, FALSE otherwise
BOOL
bool
processBootArgument(
const char *argName, // The argument to search for
const char *userString, // Typed-in boot arguments
{
const char *val;
int cnt;
BOOL found = NO;
bool found = NO;
if (getValueForBootKey(userString, argName, &val, &cnt)) {
// Don't copy; these values will be copied at the end of argument processing.
int cntRemaining;
char * argP;
char uuidStr[64];
BOOL uuidSet = NO;
bool uuidSet = NO;
char * configKernelFlags;
char * valueBuffer;
}
BOOL promptForRescanOption(void)
bool promptForRescanOption(void)
{
int key;
BOOL result = FALSE;
bool result = FALSE;
printf("\nWould you like to enable media rescan option?\nPress ENTER to enable or any key to skip.\n");
key = getc();
}
return result;
}
}

Archive Download the corresponding diff file

Revision: 21