Index: trunk/i386/libsaio/vbe.c =================================================================== --- trunk/i386/libsaio/vbe.c (revision 2520) +++ trunk/i386/libsaio/vbe.c (revision 2521) @@ -116,6 +116,8 @@ return(bb.eax.r.h); } +//============================================================================== + /* * Default GTF parameter values. */ @@ -153,6 +155,8 @@ return x*y; } +//============================================================================== + int generateCRTCTiming( unsigned short width, unsigned short height, unsigned long paramValue, @@ -260,6 +264,8 @@ return 0; } +//============================================================================== + int setVBEMode(unsigned short mode, const VBECRTCInfoBlock * timing) { bb.intno = 0x10; @@ -273,6 +279,8 @@ return(bb.eax.r.h); } +//============================================================================== + int setVBEPalette(void *palette) { bb.intno = 0x10; @@ -286,6 +294,8 @@ return(bb.eax.r.h); } +//============================================================================== + int getVBEPalette(void *palette) { bb.intno = 0x10; @@ -299,6 +309,8 @@ return(bb.eax.r.h); } +//============================================================================== + int getVBECurrentMode(unsigned short *mode) { bb.intno = 0x10; @@ -308,6 +320,8 @@ return(bb.eax.r.h); } +//============================================================================== + int getVBEPixelClock(unsigned short mode, unsigned long * pixelClock) { bb.intno = 0x10; Index: trunk/i386/libsaio/sys.c =================================================================== --- trunk/i386/libsaio/sys.c (revision 2520) +++ trunk/i386/libsaio/sys.c (revision 2521) @@ -44,21 +44,16 @@ * where everything is defaulted * Add routine, ptol(), to parse partition letters. * - */ - -/* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * * @(#)sys.c 7.1 (Berkeley) 6/5/86 + * + * Copyright 2007 VMware Inc. "Preboot" ramdisk support added by David Elliott + * */ -/* Copyright 2007 VMware Inc. - "Preboot" ramdisk support added by David Elliott - */ - - #include "libsaio.h" #include "boot.h" #include "bootstruct.h" @@ -88,7 +83,8 @@ extern int multiboot_skip_partition; extern int multiboot_skip_partition_set; -struct devsw { +struct devsw +{ const char * name; // size increased from char to short to handle non-BIOS internal devices unsigned short biosdev; @@ -120,6 +116,11 @@ void * gFSLoadAddress = 0; +#define LP '(' +#define RP ')' + +int gBIOSDev; + // Turbo - save what we think is our original BIOS boot volume if we have one 0xab BVRef gBIOSBootVolume = NULL; BVRef gBootVolume; @@ -129,30 +130,30 @@ //========================================================================== // LoadVolumeFile - LOW-LEVEL FILESYSTEM FUNCTION. -// Load the specified file from the specified volume -// to the load buffer at LOAD_ADDR. -// If the file is fat, load only the i386 portion. +// Load the specified file from the specified volume +// to the load buffer at LOAD_ADDR. +// If the file is fat, load only the i386 portion. long LoadVolumeFile(BVRef bvr, const char *filePath) { - long fileSize; + long fileSize; - // Read file into load buffer. The data in the load buffer will be - // overwritten by the next LoadFile() call. + // Read file into load buffer. The data in the load buffer will be + // overwritten by the next LoadFile() call. - gFSLoadAddress = (void *) LOAD_ADDR; + gFSLoadAddress = (void *) LOAD_ADDR; - fileSize = bvr->fs_loadfile(bvr, (char *)filePath); + fileSize = bvr->fs_loadfile(bvr, (char *)filePath); - // Return the size of the file, or -1 if load failed. + // Return the size of the file, or -1 if load failed. - return fileSize; + return fileSize; } //========================================================================== // LoadFile - LOW-LEVEL FILESYSTEM FUNCTION. -// Load the specified file to the load buffer at LOAD_ADDR. -// If the file is fat, load only the i386 portion. +// Load the specified file to the load buffer at LOAD_ADDR. +// If the file is fat, load only the i386 portion. long LoadFile(const char * fileSpec) { @@ -193,10 +194,11 @@ long LoadThinFatFile(const char *fileSpec, void **binary) { - const char *filePath; + const char *filePath = ""; FSReadFile readFile; BVRef bvr; - unsigned long length, length2; + unsigned long length; + unsigned long length2; // Resolve the boot volume from the file spec. @@ -206,14 +208,14 @@ } *binary = (void *)kLoadAddr; - + // Read file into load buffer. The data in the load buffer will be // overwritten by the next LoadFile() call. gFSLoadAddress = (void *) LOAD_ADDR; readFile = bvr->fs_readfile; - + if (readFile != NULL) { // Read the first 4096 bytes (fat header) @@ -274,7 +276,8 @@ return -1; } - if(bvr->fs_getuuid) { + if(bvr->fs_getuuid) + { rval = bvr->fs_getuuid(bvr, uuidStr); } @@ -282,35 +285,37 @@ } #endif +//========================================================================== + // filesystem-specific getUUID functions call this shared string generator long CreateUUIDString(uint8_t uubytes[], int nbytes, char *uuidStr) { - unsigned fmtbase, fmtidx, i; - uint8_t uuidfmt[] = { 4, 2, 2, 2, 6 }; - char *p = uuidStr; - MD5_CTX md5c; - uint8_t mdresult[16]; + unsigned fmtbase, fmtidx, i; + uint8_t uuidfmt[] = { 4, 2, 2, 2, 6 }; + char *p = uuidStr; + MD5_CTX md5c; + uint8_t mdresult[16]; - bzero(mdresult, sizeof(mdresult)); + bzero(mdresult, sizeof(mdresult)); - // just like AppleFileSystemDriver - MD5Init(&md5c); - MD5Update(&md5c, kFSUUIDNamespaceSHA1, sizeof(kFSUUIDNamespaceSHA1)); - MD5Update(&md5c, uubytes, nbytes); - MD5Final(mdresult, &md5c); + // just like AppleFileSystemDriver + MD5Init(&md5c); + MD5Update(&md5c, kFSUUIDNamespaceSHA1, sizeof(kFSUUIDNamespaceSHA1)); + MD5Update(&md5c, uubytes, nbytes); + MD5Final(mdresult, &md5c); - // this UUID has been made version 3 style (i.e. via namespace) - // see "-uuid-urn-" IETF draft (which otherwise copies byte for byte) - mdresult[6] = 0x30 | ( mdresult[6] & 0x0F ); - mdresult[8] = 0x80 | ( mdresult[8] & 0x3F ); + // this UUID has been made version 3 style (i.e. via namespace) + // see "-uuid-urn-" IETF draft (which otherwise copies byte for byte) + mdresult[6] = 0x30 | ( mdresult[6] & 0x0F ); + mdresult[8] = 0x80 | ( mdresult[8] & 0x3F ); - // generate the text: e.g. 5EB1869F-C4FA-3502-BDEB-3B8ED5D87292 + // generate the text: e.g. 5EB1869F-C4FA-3502-BDEB-3B8ED5D87292 i = 0; fmtbase = 0; - for(fmtidx = 0; fmtidx < sizeof(uuidfmt); fmtidx++) + for (fmtidx = 0; fmtidx < sizeof(uuidfmt); fmtidx++) { for (i = 0; i < uuidfmt[fmtidx]; i++) { @@ -354,13 +359,12 @@ //========================================================================== // GetDirEntry - LOW-LEVEL FILESYSTEM FUNCTION. -// Fetch the next directory entry for the given directory. +// Fetch the next directory entry for the given directory. -long GetDirEntry(const char * dirSpec, long long * dirIndex, const char ** name, - long * flags, u_int32_t * time) +long GetDirEntry(const char * dirSpec, long long * dirIndex, const char ** name, long * flags, u_int32_t * time) { - const char * dirPath; - BVRef bvr; + const char *dirPath; + BVRef bvr; // Resolve the boot volume from the dir spec. @@ -379,12 +383,11 @@ //========================================================================== // GetFileInfo - LOW-LEVEL FILESYSTEM FUNCTION. -// Get attributes for the specified file. +// Get attributes for the specified file. static char* gMakeDirSpec; -long GetFileInfo(const char * dirSpec, const char * name, - long * flags, u_int32_t * time) +long GetFileInfo(const char * dirSpec, const char * name, long * flags, u_int32_t * time) { long long index = 0; const char * entryName; @@ -394,18 +397,26 @@ gMakeDirSpec = (char *)malloc(1024); } - if (!dirSpec) { - long idx, len; - + if (!dirSpec) + { + long idx; + long len; len = strlen(name); for (idx = len; idx && (name[idx] != '/' && name[idx] != '\\'); idx--) {} - if (idx == 0) { - if(name[idx] == '/' || name[idx] == '\\') ++name; // todo: ensure other functions handel \ properly + + if (idx == 0) + { + if(name[idx] == '/' || name[idx] == '\\') + { + ++name; // todo: ensure other functions handel \ properly + } gMakeDirSpec[0] = '/'; gMakeDirSpec[1] = '\0'; gMakeDirSpec[idx] = '\0'; - } else { + } + else + { idx++; strncpy(gMakeDirSpec, name, idx); gMakeDirSpec[idx] = '\0'; // ISSUE: http://forge.voodooprojects.org/p/chameleon/issues/270/ @@ -435,7 +446,8 @@ // Resolve the boot volume from the file spec. - if ((bvr = getBootVolumeRef(fileSpec, &filePath)) == NULL) { + if ((bvr = getBootVolumeRef(fileSpec, &filePath)) == NULL) + { // printf("Boot volume for '%s' is bogus\n", fileSpec); return -1; } @@ -514,7 +526,8 @@ int fdesc; int i; - if (bvr == NULL) { + if (bvr == NULL) + { return -1; } @@ -527,17 +540,21 @@ // Find the next available memory block in the download buffer. io->i_buf = (char *) LOAD_ADDR; - for (i = 0; i < NFILES; i++) { - if ((iob[i].i_flgs != F_ALLOC) || (i == fdesc)) { + for (i = 0; i < NFILES; i++) + { + if ((iob[i].i_flgs != F_ALLOC) || (i == fdesc)) + { continue; } + io->i_buf = MAX(iob[i].i_filesize + iob[i].i_buf, io->i_buf); } // Load entire file into memory. Unnecessary open() calls must be avoided. gFSLoadAddress = io->i_buf; io->i_filesize = bvr->fs_loadfile(bvr, (char *)filePath); - if (io->i_filesize < 0) { + if (io->i_filesize < 0) + { close(fdesc); return -1; } @@ -557,15 +574,16 @@ return -1; } +//========================================================================== int open_bvdev(const char *bvd, const char *path, int flags) { const struct devsw *dp; - const char *cp; - BVRef bvr; - int i; - int len; - int unit; - int partition; + const char *cp; + BVRef bvr; + int i; + int len; + int unit; + int partition; if ((i = open(path, flags)) >= 0) { @@ -629,7 +647,7 @@ //========================================================================== // lseek() - Reposition the byte offset of the file descriptor from the -// beginning of the file. Returns the relocated offset. +// beginning of the file. Returns the relocated offset. int b_lseek(int fdesc, int offset, int ptr) { @@ -662,21 +680,24 @@ //========================================================================== // read() - Read up to 'count' bytes of data from the file descriptor -// into the buffer pointed to by buf. +// into the buffer pointed to by buf. int read(int fdesc, char * buf, int count) { struct iob * io; - if ((io = iob_from_fdesc(fdesc)) == NULL) { + if ((io = iob_from_fdesc(fdesc)) == NULL) + { return (-1); } - if ((io->i_offset + count) > (unsigned int)io->i_filesize) { + if ((io->i_offset + count) > (unsigned int)io->i_filesize) + { count = io->i_filesize - io->i_offset; } - if (count <= 0) { + if (count <= 0) + { return 0; // end of file } @@ -694,52 +715,56 @@ int write(int fdesc, const char * buf, int count) { struct iob * io; - + if ((io = iob_from_fdesc(fdesc)) == NULL) return (-1); - + if ((io->i_offset + count) > (unsigned int)io->i_filesize) count = io->i_filesize - io->i_offset; - + if (count <= 0) return 0; // end of file - + bcopy(buf, io->i_buf + io->i_offset, count); - + io->i_offset += count; - + return count; } +//========================================================================== + int writebyte(int fdesc, char value) { - struct iob * io; - - if ((io = iob_from_fdesc(fdesc)) == NULL) + struct iob * io; + + if ((io = iob_from_fdesc(fdesc)) == NULL) return (-1); - + if ((io->i_offset + 1) > (unsigned int)io->i_filesize) return 0; // end of file - + io->i_buf[io->i_offset++] = value; - + return 1; } +//========================================================================== + int writeint(int fdesc, int value) { struct iob * io; - + if ((io = iob_from_fdesc(fdesc)) == NULL) return (-1); - + if ((io->i_offset + 4) > (unsigned int)io->i_filesize) return 0; // end of file - + bcopy(&value, io->i_buf + io->i_offset, 4); - + io->i_offset += 4; - + return 4; } @@ -751,7 +776,8 @@ { struct iob * io; - if ((io = iob_from_fdesc(fdesc)) == 0) { + if ((io = iob_from_fdesc(fdesc)) == 0) + { return 0; } @@ -791,45 +817,47 @@ const char * dirPath; BVRef bvr; - if ((bvr = getBootVolumeRef(path, &dirPath)) == NULL) - goto error; + if ((bvr = getBootVolumeRef(path, &dirPath)) == NULL) + goto error; - dirp = (struct dirstuff *) malloc(sizeof(struct dirstuff)); - if (dirp == NULL) - goto error; + dirp = (struct dirstuff *) malloc(sizeof(struct dirstuff)); + if (dirp == NULL) + goto error; - dirp->dir_path = newString(dirPath); - if (dirp->dir_path == NULL) - goto error; + dirp->dir_path = newString(dirPath); + if (dirp->dir_path == NULL) + goto error; - dirp->dir_bvr = bvr; + dirp->dir_bvr = bvr; return dirp; error: - closedir(dirp); - return NULL; + closedir(dirp); + + return NULL; } //========================================================================== int closedir(struct dirstuff * dirp) { - if (dirp) { - if (dirp->dir_path) { + if (dirp) + { + if (dirp->dir_path) + { free(dirp->dir_path); } free(dirp); } - return 0; + return 0; } //========================================================================== -int readdir(struct dirstuff * dirp, const char ** name, long * flags, - u_int32_t * time) +int readdir(struct dirstuff * dirp, const char ** name, long * flags, u_int32_t * time) { return dirp->dir_bvr->fs_getdirentry(dirp->dir_bvr, /* dirPath */ dirp->dir_path, @@ -839,8 +867,7 @@ //========================================================================== -int readdir_ext(struct dirstuff * dirp, const char ** name, long * flags, - u_int32_t * time, FinderInfo *finderInfo, long *infoValid) +int readdir_ext(struct dirstuff * dirp, const char ** name, long * flags, u_int32_t * time, FinderInfo *finderInfo, long *infoValid) { return dirp->dir_bvr->fs_getdirentry( dirp->dir_bvr, /* dirPath */ dirp->dir_path, @@ -920,7 +947,7 @@ { filteredChain = true; } - + if (multiboot_partition_set) { for ( bvr = chain; bvr; bvr = bvr->next ) @@ -966,6 +993,7 @@ continue; } } + if ( bvr->flags & kBVFlagPrimary && bvr->biosdev == gBIOSDev ) { foundPrimary = true; @@ -1008,18 +1036,15 @@ } } } - + bvr = bvr2 ? bvr2 : bvr1 ? bvr1 : chain; - + return bvr; } //========================================================================== -#define LP '(' -#define RP ')' -int gBIOSDev; /*! This is like boot2's gBootVolume except it is for the internal use of @@ -1028,6 +1053,8 @@ */ static BVRef gRootVolume; +//========================================================================== + void setRootVolume(BVRef volume) { gRootVolume = volume; @@ -1039,6 +1066,8 @@ } } +//========================================================================== + void setBootGlobals(BVRef chain) { // Record default boot device. @@ -1053,6 +1082,7 @@ setRootVolume(gBootVolume); } +//========================================================================== /*! Extracts the volume selector from the pathname, returns the selected BVRef, and sets *outPath to the remainder of the path. @@ -1063,20 +1093,22 @@ */ BVRef getBootVolumeRef( const char * path, const char ** outPath ) { - const char * cp; - BVRef bvr = gRootVolume; - int biosdev = gBIOSDev; + const char *cp; + BVRef bvr = gRootVolume; + int biosdev = gBIOSDev; - // Search for left parenthesis in the path specification. + // Search for left parenthesis in the path specification. - for (cp = path; *cp; cp++) { + for (cp = path; *cp; cp++) + { if (*cp == LP || *cp == '/') { break; } } - if (*cp != LP) { // no left paren found + if (*cp != LP) // no left paren found + { cp = path; // Path is using the implicit current device so if there is // no current device, then we must fail. @@ -1084,7 +1116,9 @@ { return NULL; } - } else if ((cp - path) == 2) { // found "xx(" + } + else if ((cp - path) == 2) // found "xx(" + { const struct devsw * dp; const char * xp = path; @@ -1109,7 +1143,7 @@ error("Unknown device '%c%c'\n", xp[0], xp[1]); return NULL; } - + // Extract the optional unit number from the specification. // hd(unit) or hd(unit, part). @@ -1227,6 +1261,7 @@ } bvr1 = bvr; + if ( bvr->part_no == partno ) { break; @@ -1247,7 +1282,7 @@ { return 0; } - + *str = '\0'; if (bvr) @@ -1263,6 +1298,8 @@ return sprintf(str, "%s(%d,%d)", dp->name, bvr->biosdev - dp->biosdev, bvr->part_no); } } - + return 0; } + +//========================================================================== Index: trunk/i386/boot2/modules.c =================================================================== --- trunk/i386/boot2/modules.c (revision 2520) +++ trunk/i386/boot2/modules.c (revision 2521) @@ -60,8 +60,8 @@ */ int init_module_system() { - // Start any modules that were compiled in first. - start_built_in_modules(); + // Start any modules that were compiled in first. + start_built_in_modules(); int retVal = 0; @@ -119,7 +119,7 @@ char* name = strdup(last); name[strlen(last) - sizeof("dylib")] = 0; - DBG("Loading multiboot module %s", name); + DBG("Loading multiboot module %s\n", name); module_start = parse_mach(module_data, &load_module, &add_symbol, NULL); @@ -178,7 +178,8 @@ char* tmp = malloc(strlen(name) + 1); strcpy(tmp, name); - if(!load_module(tmp)) { + if(!load_module(tmp)) + { // failed to load // free(tmp); } @@ -269,7 +270,7 @@ { // This only can handle 32bit symbols symbolList_t* entry; - //DBG("Adding symbol %s at 0x%X\n", symbol, addr); + DBG("Adding symbol %s at 0x%X\n", symbol, addr); entry = malloc(sizeof(symbolList_t)); entry->next = moduleSymbols; @@ -299,9 +300,9 @@ loadedModules = new_entry; - if(!name) name = "Unknown"; - if(!author) author = "Unknown"; - if(!description) description = ""; + if(!name) name = "Unknown"; + if(!author) author = "Unknown"; + if(!description) description = ""; new_entry->name = name; new_entry->author = author; @@ -309,11 +310,11 @@ new_entry->version = version; new_entry->compat = compat; - msglog("Module '%s' by '%s' Loaded.\n", name, author); - msglog("\tInitialization: 0x%X\n", start); - msglog("\tDescription: %s\n", description); - msglog("\tVersion: %d\n", version); // todo: sperate to major.minor.bugfix - msglog("\tCompat: %d\n", compat); // todo: ^^^ major.minor.bugfix + DBG("Module '%s' by '%s' Loaded.\n", name, author); + DBG("\tInitialization: 0x%X\n", start); + DBG("\tDescription: %s\n", description); + DBG("\tVersion: %d\n", version); // todo: sperate to major.minor.bugfix + DBG("\tCompat: %d\n", compat); // todo: ^^^ major.minor.bugfix } int is_module_loaded(const char* name) @@ -482,7 +483,7 @@ } } break; - case LC_SEGMENT_64: // 64bit macho's + case LC_SEGMENT_64: // 64bit macho's { segCommand64 = binary + binaryIndex; UInt32 sectionIndex; Index: trunk/i386/boot2/options.c =================================================================== --- trunk/i386/boot2/options.c (revision 2520) +++ trunk/i386/boot2/options.c (revision 2521) @@ -108,12 +108,12 @@ static int countdown( const char * msg, int row, int timeout ) { - unsigned long time; - int ch = 0; - int col = strlen(msg) + 1; - - flushKeyboardBuffer(); + unsigned long time; + int ch = 0; + int col = strlen(msg) + 1; + flushKeyboardBuffer(); + if( bootArgs->Video.v_display == VGA_TEXT_MODE ) { moveCursor( 0, row ); @@ -122,53 +122,53 @@ } else { position_t p = pos( gui.screen.width / 2 + 1 , ( gui.devicelist.pos.y + 3 ) + ( ( gui.devicelist.height - gui.devicelist.iconspacing ) / 2 ) ); - + char dummy[80]; getBootVolumeDescription( gBootVolume, dummy, sizeof(dummy) - 1, true ); drawDeviceIcon( gBootVolume, gui.screen.pixmap, p, true ); drawStrCenteredAt( (char *) msg, &font_small, gui.screen.pixmap, gui.countdown.pos ); - + // make this screen the new background memcpy( gui.backbuffer->pixels, gui.screen.pixmap->pixels, gui.backbuffer->width * gui.backbuffer->height * 4 ); - + } int multi_buff = 18 * (timeout); - int multi = ++multi_buff; + int multi = ++multi_buff; - int lasttime=0; + int lasttime=0; - for ( time = time18(), timeout++; timeout > 0; ) - { + for ( time = time18(), timeout++; timeout > 0; ) + { if( time18() > lasttime) { multi--; lasttime=time18(); } - if ( (ch = readKeyboardStatus()) ) - break; + if ( (ch = readKeyboardStatus()) ) + break; - // Count can be interrupted by holding down shift, - // control or alt key - if ( ( readKeyboardShiftFlags() & 0x0F ) != 0 ) + // Count can be interrupted by holding down shift, + // control or alt key + if ( ( readKeyboardShiftFlags() & 0x0F ) != 0 ) { - ch = 1; - break; - } + ch = 1; + break; + } - if ( time18() >= time ) - { - time += 18; - timeout--; + if ( time18() >= time ) + { + time += 18; + timeout--; if( bootArgs->Video.v_display == VGA_TEXT_MODE ) { moveCursor( col, row ); printf("(%d) ", timeout); } - } - + } + if( bootArgs->Video.v_display != VGA_TEXT_MODE ) { drawProgressBar( gui.screen.pixmap, 100, gui.progressbar.pos , ( multi * 100 / multi_buff ) ); @@ -176,11 +176,11 @@ updateVRAM(); } - } + } - flushKeyboardBuffer(); + flushKeyboardBuffer(); - return ch; + return ch; } //========================================================================== @@ -196,7 +196,8 @@ gBootArgsPtr = gBootArgs; memset(gBootArgs, '\0', BOOT_STRING_LEN); - if (bootArgs->Video.v_display != VGA_TEXT_MODE) { + if (bootArgs->Video.v_display != VGA_TEXT_MODE) + { clearGraphicBootPrompt(); } execute_hook("ClearArgs", NULL, NULL, NULL, NULL); @@ -219,26 +220,37 @@ extern char bootPrompt[]; extern char bootRescanPrompt[]; - if( bootArgs->Video.v_display == VGA_TEXT_MODE ) { - changeCursor( 0, row, kCursorTypeUnderline, 0 ); + if( bootArgs->Video.v_display == VGA_TEXT_MODE ) + { + changeCursor( 0, row, kCursorTypeUnderline, 0 ); clearScreenRows( row, kScreenLastRow ); } clearBootArgs(); - if (visible) { - if (bootArgs->Video.v_display == VGA_TEXT_MODE) { - if (gEnableCDROMRescan) { + if (visible) + { + if (bootArgs->Video.v_display == VGA_TEXT_MODE) + { + if (gEnableCDROMRescan) + { printf( bootRescanPrompt ); - } else { + } + else + { printf( bootPrompt ); printf( gBootArgs ); } } - } else { - if (bootArgs->Video.v_display != VGA_TEXT_MODE) { + } + else + { + if (bootArgs->Video.v_display != VGA_TEXT_MODE) + { clearGraphicBootPrompt(); - } else { + } + else + { printf("Press Enter to start up the foreign OS. "); } } @@ -267,29 +279,31 @@ x--; } - if( bootArgs->Video.v_display == VGA_TEXT_MODE ) - { - setCursorPosition( x, y, 0 ); - putca(' ', 0x07, 1); - } + if( bootArgs->Video.v_display == VGA_TEXT_MODE ) + { + setCursorPosition( x, y, 0 ); + putca(' ', 0x07, 1); + } else - { - updateGraphicBootPrompt(); - } - } + { + updateGraphicBootPrompt(); + } + } break; default: - if ( key >= ' ' && gBootArgsPtr < gBootArgsEnd) - { - *gBootArgsPtr++ = key; + if ( key >= ' ' && gBootArgsPtr < gBootArgsEnd) + { + *gBootArgsPtr++ = key; - if( bootArgs->Video.v_display != VGA_TEXT_MODE ) updateGraphicBootPrompt(); - else if ( key >= ' ' && key < 0x7f) putchar(key); - } - - break; - } + if( bootArgs->Video.v_display != VGA_TEXT_MODE ) + updateGraphicBootPrompt(); + else if ( key >= ' ' && key < 0x7f) + putchar(key); + } + + break; + } } //========================================================================== @@ -361,11 +375,11 @@ // Draw the visible items. if( bootArgs->Video.v_display != VGA_TEXT_MODE ) - + drawDeviceList(gMenuStart, gMenuEnd, gMenuSelection); else { - + changeCursor( 0, row, kCursorTypeHidden, &cursorState ); for ( i = gMenuTop; i <= gMenuBottom; i++ ) @@ -374,7 +388,7 @@ } restoreCursor( &cursorState ); - } + } } //==========================================================================