Author: blueswirl Date: 2008-11-30 12:54:01 +0100 (Sun, 30 Nov 2008) New Revision: 274
Modified: openbios-devel/arch/ppc/qemu/console.c openbios-devel/arch/ppc/qemu/init.c openbios-devel/arch/ppc/qemu/qemu.c openbios-devel/arch/ppc/qemu/qemu.h openbios-devel/arch/ppc/qemu/tree.c openbios-devel/arch/sparc32/aoutload.c openbios-devel/arch/sparc32/boot.c openbios-devel/arch/sparc32/boot.h openbios-devel/arch/sparc32/context.c openbios-devel/arch/sparc32/elfload.c openbios-devel/arch/sparc32/forthload.c openbios-devel/arch/sparc32/linux_load.c openbios-devel/arch/sparc32/romvec.c openbios-devel/arch/sparc32/sys_info.c openbios-devel/arch/sparc64/aoutload.c openbios-devel/arch/sparc64/boot.c openbios-devel/arch/sparc64/boot.h openbios-devel/arch/sparc64/context.c openbios-devel/arch/sparc64/elfload.c openbios-devel/arch/sparc64/fcodeload.c openbios-devel/arch/sparc64/forthload.c openbios-devel/arch/sparc64/linux_load.c openbios-devel/arch/sparc64/sys_info.c openbios-devel/drivers/adb.c openbios-devel/drivers/adb.h openbios-devel/drivers/cuda.c openbios-devel/drivers/esp.c openbios-devel/drivers/iommu.c openbios-devel/drivers/obio.c openbios-devel/drivers/timer.c openbios-devel/drivers/vga.h openbios-devel/fs/grubfs/fsys_affs.c openbios-devel/fs/grubfs/fsys_ext2fs.c openbios-devel/fs/grubfs/fsys_jfs.c openbios-devel/fs/grubfs/fsys_reiserfs.c openbios-devel/fs/grubfs/fsys_ufs.c openbios-devel/fs/grubfs/fsys_vstafs.c openbios-devel/fs/grubfs/grubfs_fs.c openbios-devel/fs/hfsplus/btree.c openbios-devel/fs/hfsplus/include/libhfsp.h openbios-devel/fs/hfsplus/volume.c openbios-devel/include/elf_boot.h openbios-devel/include/libc/string.h openbios-devel/include/openbios/drivers.h openbios-devel/kernel/dict.c openbios-devel/kernel/internal.c openbios-devel/libc/misc.c openbios-devel/libc/string.c openbios-devel/libc/vsprintf.c openbios-devel/modules/cmdline.c openbios-devel/modules/video.c Log: Fix most warnings from Sparse
Modified: openbios-devel/arch/ppc/qemu/console.c =================================================================== --- openbios-devel/arch/ppc/qemu/console.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/ppc/qemu/console.c 2008-11-30 11:54:01 UTC (rev 274) @@ -58,7 +58,7 @@ static void uart_putchar(int port, unsigned char c) { if (!port) - return -1; + return; while (!(inb(LSR(port)) & 0x20)); outb(c, THR(port)); } @@ -134,6 +134,7 @@ #define openbios_GetFBInfo(x) Qemu_GetFBInfo(x)
#include "../../../modules/font_8x16.c" +#undef FONTDATAMAX #include "../../../modules/video.c" #include "../../../modules/console.c"
Modified: openbios-devel/arch/ppc/qemu/init.c =================================================================== --- openbios-devel/arch/ppc/qemu/init.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/ppc/qemu/init.c 2008-11-30 11:54:01 UTC (rev 274) @@ -47,7 +47,7 @@ ARCH_HEATHROW, };
-pci_arch_t known_arch[] = { +static pci_arch_t known_arch[] = { [ARCH_PREP] = { "PREP", 0x1057, 0x4801, 0x80800000, 0x800c0000, 0x80000000, 0x00100000, 0xf0000000, 0x10000000, 0x80000000, 0x00010000, 0x00000000, 0x00400000,
Modified: openbios-devel/arch/ppc/qemu/qemu.c =================================================================== --- openbios-devel/arch/ppc/qemu/qemu.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/ppc/qemu/qemu.c 2008-11-30 11:54:01 UTC (rev 274) @@ -20,6 +20,7 @@ #include "openbios/kernel.h" #include "openbios/nvram.h" #include "openbios/bindings.h" +#include "openbios/drivers.h" #include "libc/vsprintf.h" #include "libc/string.h" #include "libc/byteorder.h" @@ -111,7 +112,7 @@ set_property(dnode, "compatible", "nvram,flash", 12); props[0] = __cpu_to_be32(IO_NVRAM_OFFSET); props[1] = __cpu_to_be32(IO_NVRAM_SIZE); - set_property(dnode, "reg", &props, sizeof(props)); + set_property(dnode, "reg", (char *)&props, sizeof(props)); set_property(dnode, "device_type", "nvram", 6);
chosen = find_dev("/chosen");
Modified: openbios-devel/arch/ppc/qemu/qemu.h =================================================================== --- openbios-devel/arch/ppc/qemu/qemu.h 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/ppc/qemu/qemu.h 2008-11-30 11:54:01 UTC (rev 274) @@ -21,6 +21,9 @@
extern int console_draw_str( const char *str );
+/* console.c */ +int serial_init(void); + #include "kernel.h"
#endif /* _H_QEMU */
Modified: openbios-devel/arch/ppc/qemu/tree.c =================================================================== --- openbios-devel/arch/ppc/qemu/tree.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/ppc/qemu/tree.c 2008-11-30 11:54:01 UTC (rev 274) @@ -16,6 +16,7 @@
#include "openbios/config.h" #include "openbios/bindings.h" +#include "qemu.h"
void devtree_init( void ) {
Modified: openbios-devel/arch/sparc32/aoutload.c =================================================================== --- openbios-devel/arch/sparc32/aoutload.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc32/aoutload.c 2008-11-30 11:54:01 UTC (rev 274) @@ -51,8 +51,7 @@ return 0; }
-int aout_load(struct sys_info *info, const char *filename, const char *cmdline, - const void *romvec) +int aout_load(struct sys_info *info, const char *filename, const void *romvec) { int retval = -1; int image_retval; @@ -60,7 +59,7 @@ unsigned long start, size; unsigned int offset;
- image_name = image_version = 0; + image_name = image_version = NULL;
if (!file_open(filename)) goto out;
Modified: openbios-devel/arch/sparc32/boot.c =================================================================== --- openbios-devel/arch/sparc32/boot.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc32/boot.c 2008-11-30 11:54:01 UTC (rev 274) @@ -6,6 +6,7 @@ #include "openbios/bindings.h" #include "openbios/elfload.h" #include "openbios/nvram.h" +#include "openbios/drivers.h" #include "libc/diskio.h" #include "libc/vsprintf.h" #include "sys_info.h" @@ -103,14 +104,17 @@ printk("without parameters.\n");
if (elf_load(&sys_info, path, param, romvec) == LOADER_NOT_SUPPORT) - if (linux_load(&sys_info, path, param, romvec) == LOADER_NOT_SUPPORT) - if (aout_load(&sys_info, path, param, romvec) == LOADER_NOT_SUPPORT) { + if (linux_load(&sys_info, path, param) == LOADER_NOT_SUPPORT) + if (aout_load(&sys_info, path, romvec) == LOADER_NOT_SUPPORT) {
sprintf(altpath, "%s:d", path);
- if (elf_load(&sys_info, altpath, param, romvec) == LOADER_NOT_SUPPORT) - if (linux_load(&sys_info, altpath, param, romvec) == LOADER_NOT_SUPPORT) - if (aout_load(&sys_info, altpath, param, romvec) == LOADER_NOT_SUPPORT) + if (elf_load(&sys_info, altpath, param, romvec) + == LOADER_NOT_SUPPORT) + if (linux_load(&sys_info, altpath, param) + == LOADER_NOT_SUPPORT) + if (aout_load(&sys_info, altpath, romvec) + == LOADER_NOT_SUPPORT) printk("Unsupported image format\n"); }
Modified: openbios-devel/arch/sparc32/boot.h =================================================================== --- openbios-devel/arch/sparc32/boot.h 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc32/boot.h 2008-11-30 11:54:01 UTC (rev 274) @@ -6,25 +6,35 @@ * the copyright and warranty status of this work. */
-int forth_load(struct sys_info *info, const char *filename, const char *cmdline); +// forthload.c +int forth_load(const char *filename); + +// elfload.c int elf_load(struct sys_info *, const char *filename, const char *cmdline, const void *romvec); -int aout_load(struct sys_info *, const char *filename, const char *cmdline, - const void *romvec); -int linux_load(struct sys_info *, const char *filename, const char *cmdline, - const void *romvec);
+// aout_load.c +int aout_load(struct sys_info *info, const char *filename, const void *romvec); + +// linux_load.c +int linux_load(struct sys_info *info, const char *file, const char *cmdline); + +// context.c +extern struct context *__context; unsigned int start_elf(unsigned long entry_point, unsigned long param);
+// romvec.c void *init_openprom(unsigned long memsize, const char *path); + +// boot.c +extern struct sys_info sys_info; void boot(void);
-extern struct sys_info sys_info; -extern uint32_t kernel_image; -extern uint32_t kernel_size; -extern uint32_t qemu_cmdline; -extern uint32_t cmdline_size; -extern char boot_device; +// sys_info.c extern unsigned int qemu_mem_size; + +// romvec.c extern struct linux_arguments_v0 obp_arg; + +// openbios.c extern int qemu_machine_type;
Modified: openbios-devel/arch/sparc32/context.c =================================================================== --- openbios-devel/arch/sparc32/context.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc32/context.c 2008-11-30 11:54:01 UTC (rev 274) @@ -22,7 +22,7 @@ * It is placed at the bottom of our stack, and loaded by assembly routine * to start us up. */ -struct context main_ctx = { +static struct context main_ctx = { .regs[REG_SP] = (uint32_t) &_estack - 96, .pc = (uint32_t) start_main, .npc = (uint32_t) start_main + 4,
Modified: openbios-devel/arch/sparc32/elfload.c =================================================================== --- openbios-devel/arch/sparc32/elfload.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc32/elfload.c 2008-11-30 11:54:01 UTC (rev 274) @@ -26,7 +26,7 @@
if (alloc_size < nmemb || alloc_size < size) { printf("calloc overflow: %u, %u\n", nmemb, size); - return 0; + return NULL; }
mem = malloc(alloc_size); @@ -314,7 +314,7 @@ int image_retval; unsigned int offset;
- image_name = image_version = 0; + image_name = image_version = NULL;
if (!file_open(filename)) goto out;
Modified: openbios-devel/arch/sparc32/forthload.c =================================================================== --- openbios-devel/arch/sparc32/forthload.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc32/forthload.c 2008-11-30 11:54:01 UTC (rev 274) @@ -16,7 +16,8 @@ #define debug printk
static char *forthtext=NULL; -int forth_load(struct sys_info *info, const char *filename, const char *cmdline) + +int forth_load(const char *filename) { char magic[2]; unsigned long forthsize;
Modified: openbios-devel/arch/sparc32/linux_load.c =================================================================== --- openbios-devel/arch/sparc32/linux_load.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc32/linux_load.c 2008-11-30 11:54:01 UTC (rev 274) @@ -156,7 +156,7 @@ uint8_t reserved17[1792]; /* 0x900 - 0x1000 */ };
-uint64_t forced_memsize; +static uint64_t forced_memsize;
/* Load the first part the file and check if it's Linux */ static uint32_t load_linux_header(struct linux_header *hdr) @@ -293,14 +293,14 @@ unsigned long len; int k_len; int to_kern; - char *initrd = 0; + char *initrd = NULL; int toolong = 0;
forced_memsize = 0;
if (!orig_cmdline) { - *kern_cmdline = 0; - return 0; + *kern_cmdline = '\0'; + return NULL; }
k_len = 0; @@ -327,7 +327,7 @@ val = sep + 1; len = end - val; } else { - val = 0; + val = NULL; len = 0; }
@@ -434,8 +434,8 @@ return kern_size; }
-static int load_initrd(struct linux_header *hdr, struct sys_info *info, - uint32_t kern_end, struct linux_params *params, const char *initrd_file) +static int load_initrd(struct linux_header *hdr, uint32_t kern_end, + struct linux_params *params, const char *initrd_file) { uint32_t max; uint32_t start, end, size; @@ -549,7 +549,7 @@ }
/* Start Linux */ -static int start_linux(uint32_t kern_addr, struct linux_params *params) +static int start_linux(uint32_t kern_addr) { struct context *ctx; //extern int cursor_x, cursor_y; @@ -579,13 +579,12 @@ return ctx->regs[REG_O0]; }
-int linux_load(struct sys_info *info, const char *file, const char *cmdline, - const void *romvec) +int linux_load(struct sys_info *info, const char *file, const char *cmdline) { struct linux_header hdr; struct linux_params *params; uint32_t kern_addr, kern_size; - char *initrd_file = 0; + char *initrd_file = NULL;
if (!file_open(file)) return -1; @@ -610,7 +609,7 @@ }
if (initrd_file) { - if (load_initrd(&hdr, info, kern_addr+kern_size, params, initrd_file) + if (load_initrd(&hdr, kern_addr+kern_size, params, initrd_file) != 0) { free(initrd_file); return -1; @@ -620,6 +619,6 @@
hardware_setup();
- start_linux(kern_addr, params); + start_linux(kern_addr); return 0; }
Modified: openbios-devel/arch/sparc32/romvec.c =================================================================== --- openbios-devel/arch/sparc32/romvec.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc32/romvec.c 2008-11-30 11:54:01 UTC (rev 274) @@ -257,18 +257,14 @@
static void obp_reboot(char *str) { - extern volatile unsigned int *reset_reg; - printk("rebooting (%s)\n", str); *reset_reg = 1; printk("reboot failed\n"); for (;;) {} }
-extern volatile unsigned char *power_reg; static void obp_abort(void) { - printk("abort, power off\n"); *power_reg = 1; printk("power off failed\n");
Modified: openbios-devel/arch/sparc32/sys_info.c =================================================================== --- openbios-devel/arch/sparc32/sys_info.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc32/sys_info.c 2008-11-30 11:54:01 UTC (rev 274) @@ -3,6 +3,7 @@ #include "elf_boot.h" #include "sys_info.h" #include "context.h" +#include "boot.h"
#define printf printk #ifdef CONFIG_DEBUG_BOOT @@ -20,7 +21,6 @@ int i; unsigned long long total = 0; struct memrange *mmap; - extern struct elf_image_note elf_image_notes;
/* Pick up paramters given by bootloader to us */ //info->boot_type = boot_ctx->eax;
Modified: openbios-devel/arch/sparc64/aoutload.c =================================================================== --- openbios-devel/arch/sparc64/aoutload.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc64/aoutload.c 2008-11-30 11:54:01 UTC (rev 274) @@ -52,7 +52,7 @@ return 0; }
-int aout_load(struct sys_info *info, const char *filename, const char *cmdline) +int aout_load(struct sys_info *info, const char *filename) { int retval = -1; int image_retval; @@ -60,7 +60,7 @@ unsigned long start, size; unsigned int offset;
- image_name = image_version = 0; + image_name = image_version = NULL;
if (!file_open(filename)) goto out;
Modified: openbios-devel/arch/sparc64/boot.c =================================================================== --- openbios-devel/arch/sparc64/boot.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc64/boot.c 2008-11-30 11:54:01 UTC (rev 274) @@ -85,9 +85,8 @@
if (elf_load(&sys_info, path, param) == LOADER_NOT_SUPPORT) if (linux_load(&sys_info, path, param) == LOADER_NOT_SUPPORT) - if (aout_load(&sys_info, path, param) == LOADER_NOT_SUPPORT) - if (fcode_load(&sys_info, path, param) - == LOADER_NOT_SUPPORT) { + if (aout_load(&sys_info, path) == LOADER_NOT_SUPPORT) + if (fcode_load(path) == LOADER_NOT_SUPPORT) {
sprintf(altpath, "%s:d", path);
@@ -95,9 +94,9 @@ == LOADER_NOT_SUPPORT) if (linux_load(&sys_info, altpath, param) == LOADER_NOT_SUPPORT) - if (aout_load(&sys_info, altpath, param) + if (aout_load(&sys_info, altpath) == LOADER_NOT_SUPPORT) - if (fcode_load(&sys_info, path, param) + if (fcode_load(altpath) == LOADER_NOT_SUPPORT) printk("Unsupported image format\n"); }
Modified: openbios-devel/arch/sparc64/boot.h =================================================================== --- openbios-devel/arch/sparc64/boot.h 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc64/boot.h 2008-11-30 11:54:01 UTC (rev 274) @@ -6,21 +6,32 @@ * the copyright and warranty status of this work. */
-int forth_load(struct sys_info *info, const char *filename, const char *cmdline); +// forthload.c +int forth_load(const char *filename); + +// elfload.c int elf_load(struct sys_info *info, const char *filename, const char *cmdline); + +// aout_load.c +int aout_load(struct sys_info *info, const char *filename); + +// linux_load.c int linux_load(struct sys_info *info, const char *file, const char *cmdline); -int aout_load(struct sys_info *info, const char *filename, const char *cmdline); -int fcode_load(struct sys_info *info, const char *filename, - const char *cmdline);
+// fcodeload.c +int fcode_load(const char *filename); + +// context.c uint64_t start_elf(uint64_t entry_point, uint64_t param);
-void boot(void); - +// boot.c +extern struct sys_info sys_info; extern uint64_t kernel_image; extern uint64_t kernel_size; extern uint64_t qemu_cmdline; extern uint64_t cmdline_size; extern char boot_device; -extern struct sys_info sys_info; +void boot(void); + +// console.c void ob_su_init(uint64_t base, uint64_t offset, int intr);
Modified: openbios-devel/arch/sparc64/context.c =================================================================== --- openbios-devel/arch/sparc64/context.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc64/context.c 2008-11-30 11:54:01 UTC (rev 274) @@ -22,7 +22,7 @@ * It is placed at the bottom of our stack, and loaded by assembly routine * to start us up. */ -struct context main_ctx = { +static struct context main_ctx = { .regs[REG_SP] = (uint64_t) &_estack - 2047 - 96, .pc = (uint64_t) start_main, .npc = (uint64_t) start_main + 4,
Modified: openbios-devel/arch/sparc64/elfload.c =================================================================== --- openbios-devel/arch/sparc64/elfload.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc64/elfload.c 2008-11-30 11:54:01 UTC (rev 274) @@ -26,7 +26,7 @@
if (alloc_size < nmemb || alloc_size < size) { printf("calloc overflow: %u, %u\n", nmemb, size); - return 0; + return NULL; }
mem = malloc(alloc_size); @@ -313,7 +313,7 @@ int image_retval; unsigned int offset;
- image_name = image_version = 0; + image_name = image_version = NULL;
if (!file_open(filename)) goto out;
Modified: openbios-devel/arch/sparc64/fcodeload.c =================================================================== --- openbios-devel/arch/sparc64/fcodeload.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc64/fcodeload.c 2008-11-30 11:54:01 UTC (rev 274) @@ -11,8 +11,7 @@ #define printf printk #define debug printk
-int fcode_load(struct sys_info *info, const char *filename, - const char *cmdline) +int fcode_load(const char *filename) { int retval = -1; uint8_t fcode_header[8];
Modified: openbios-devel/arch/sparc64/forthload.c =================================================================== --- openbios-devel/arch/sparc64/forthload.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc64/forthload.c 2008-11-30 11:54:01 UTC (rev 274) @@ -16,7 +16,7 @@ #define debug printk
static char *forthtext=NULL; -int forth_load(struct sys_info *info, const char *filename, const char *cmdline) +int forth_load(const char *filename) { char magic[2]; unsigned long forthsize;
Modified: openbios-devel/arch/sparc64/linux_load.c =================================================================== --- openbios-devel/arch/sparc64/linux_load.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc64/linux_load.c 2008-11-30 11:54:01 UTC (rev 274) @@ -156,7 +156,7 @@ uint8_t reserved17[1792]; /* 0x900 - 0x1000 */ };
-uint64_t forced_memsize; +static uint64_t forced_memsize;
/* Load the first part the file and check if it's Linux */ static uint32_t load_linux_header(struct linux_header *hdr) @@ -293,14 +293,14 @@ unsigned long len; int k_len; int to_kern; - char *initrd = 0; + char *initrd = NULL; int toolong = 0;
forced_memsize = 0;
if (!orig_cmdline) { - *kern_cmdline = 0; - return 0; + *kern_cmdline = '\0'; + return NULL; }
k_len = 0; @@ -327,7 +327,7 @@ val = sep + 1; len = end - val; } else { - val = 0; + val = NULL; len = 0; }
@@ -584,7 +584,7 @@ struct linux_header hdr; struct linux_params *params; uint32_t kern_addr, kern_size; - char *initrd_file = 0; + char *initrd_file = NULL;
if (!file_open(file)) return -1;
Modified: openbios-devel/arch/sparc64/sys_info.c =================================================================== --- openbios-devel/arch/sparc64/sys_info.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc64/sys_info.c 2008-11-30 11:54:01 UTC (rev 274) @@ -21,7 +21,6 @@ int i; unsigned long long total = 0; struct memrange *mmap; - extern struct elf_image_note elf_image_notes;
/* Pick up paramters given by bootloader to us */ //info->boot_type = boot_ctx->eax;
Modified: openbios-devel/drivers/adb.c =================================================================== --- openbios-devel/drivers/adb.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/drivers/adb.c 2008-11-30 11:54:01 UTC (rev 274) @@ -39,8 +39,6 @@ #define ADB_DPRINTF(fmt, args...) do { } while (0) #endif
-static void adb_read(void); - DECLARE_UNNAMED_NODE( keyboard, INSTALL_OPEN, sizeof(int));
static void @@ -447,7 +445,6 @@ int next_key; };
-static adb_kbd_t *my_adb_kbd = NULL; static adb_dev_t *my_adb_dev = NULL;
static int adb_kbd_read (void *private) @@ -504,7 +501,7 @@
set_property(ph, "device_type", "keyboard", 9); props[0] = __cpu_to_be32(dev->addr); - set_property(ph, "reg", &props, sizeof(props)); + set_property(ph, "reg", (char *)&props, sizeof(props));
aliases = find_dev("/aliases"); set_property(aliases, "adb-keyboard", buf, strlen(buf) + 1); @@ -542,14 +539,12 @@ { }
-static void mouse_read(void); - NODE_METHODS( mouse ) = { { "open", mouse_open }, { "close", mouse_close }, };
-void *adb_mouse_new (char *path, void *private) +void adb_mouse_new (char *path, void *private) { char buf[64]; int props[1]; @@ -563,7 +558,7 @@
set_property(ph, "device_type", "mouse", 6); props[0] = __cpu_to_be32(dev->addr); - set_property(ph, "reg", &props, sizeof(props)); + set_property(ph, "reg", (char *)&props, sizeof(props)); set_int_property(ph, "#buttons", 3);
aliases = find_dev("/aliases");
Modified: openbios-devel/drivers/adb.h =================================================================== --- openbios-devel/drivers/adb.h 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/drivers/adb.h 2008-11-30 11:54:01 UTC (rev 274) @@ -101,5 +101,6 @@
void *adb_kbd_new (char *path, void *private);
+void adb_mouse_new (char *path, void *private);
#endif /* !defined(__OHW_ADB_H__) */
Modified: openbios-devel/drivers/cuda.c =================================================================== --- openbios-devel/drivers/cuda.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/drivers/cuda.c 2008-11-30 11:54:01 UTC (rev 274) @@ -171,7 +171,7 @@ props[0] = __cpu_to_be32(IO_CUDA_OFFSET); props[1] = __cpu_to_be32(IO_CUDA_SIZE);
- set_property(ph, "reg", &props, sizeof(props)); + set_property(ph, "reg", (char *)&props, sizeof(props)); set_int_property(ph, "interrupt-parent", pic_handle); // HEATHROW set_int_property(ph, "interrupts", 0x12);
Modified: openbios-devel/drivers/esp.c =================================================================== --- openbios-devel/drivers/esp.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/drivers/esp.c 2008-11-30 11:54:01 UTC (rev 274) @@ -62,7 +62,7 @@ sd_private_t sd[8]; } esp_private_t;
-esp_private_t *global_esp; +static esp_private_t *global_esp;
/* DECLARE data structures for the nodes. */ DECLARE_UNNAMED_NODE(ob_sd, INSTALL_OPEN, sizeof(sd_private_t *)); @@ -304,7 +304,7 @@ { espdma->regs = (void *)map_io(base + (uint64_t)offset, 0x10);
- if (espdma->regs == 0) { + if (espdma->regs == NULL) { DPRINTF("espdma_init: cannot map registers\n"); return -1; } @@ -437,7 +437,7 @@ /* Get the IO region */ esp->ll = (void *)map_io(base + (uint64_t)espoffset, sizeof(struct esp_regs)); - if (esp->ll == 0) { + if (esp->ll == NULL) { DPRINTF("Can't map ESP registers\n"); return -1; }
Modified: openbios-devel/drivers/iommu.c =================================================================== --- openbios-devel/drivers/iommu.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/drivers/iommu.c 2008-11-30 11:54:01 UTC (rev 274) @@ -41,7 +41,7 @@ };
struct mem cmem; /* Current memory, virtual */ -struct mem cio; /* Current I/O space */ +static struct mem cio; /* Current I/O space */
unsigned int va_shift;
@@ -59,7 +59,7 @@ struct mem bmap; };
-struct iommu ciommu; +static struct iommu ciommu; static struct iommu_regs *regs;
static void iommu_init(struct iommu *t, uint64_t base); @@ -95,7 +95,7 @@
if ((unsigned long)p >= (unsigned long)t->uplim || (unsigned long)p + size > (unsigned long)t->uplim) - return 0; + return NULL; t->curp = p + size;
return p; @@ -106,7 +106,7 @@ { char *p;
- if ((p = mem_alloc(t, size, align)) != 0) + if ((p = mem_alloc(t, size, align)) != NULL) memset(p, 0, size);
return p; @@ -124,7 +124,7 @@ if (alloc) { p = mem_zalloc(&cmem, SRMMU_PTRS_PER_PMD * sizeof(int), SRMMU_PTRS_PER_PMD * sizeof(int)); - if (p == 0) + if (p == NULL) return -1; pte = SRMMU_ET_PTD | ((va2pa((unsigned long)p)) >> 4); l1[(va >> SRMMU_PGDIR_SHIFT) & (SRMMU_PTRS_PER_PGD - 1)] = pte; @@ -141,7 +141,7 @@ if (alloc) { p = mem_zalloc(&cmem, SRMMU_PTRS_PER_PTE * sizeof(void *), SRMMU_PTRS_PER_PTE * sizeof(void *)); - if (p == 0) + if (p == NULL) return -2; pte = SRMMU_ET_PTD | ((va2pa((unsigned int)p)) >> 4); *(uint32_t *)pa2va(pa) = pte; @@ -199,7 +199,7 @@ pa &= ~(PAGE_SIZE - 1);
va = mem_alloc(&cio, npages * PAGE_SIZE, PAGE_SIZE); - if (va == 0) + if (va == NULL) return va;
mva = (unsigned int) va; @@ -435,12 +435,12 @@
npages = (size + (PAGE_SIZE-1)) / PAGE_SIZE; va = mem_alloc(&cmem, npages * PAGE_SIZE, PAGE_SIZE); - if (va == 0) - return 0; + if (va == NULL) + return NULL;
ba = (unsigned int)mem_alloc(&t->bmap, npages * PAGE_SIZE, PAGE_SIZE); if (ba == 0) - return 0; + return NULL;
pa = (unsigned int)va2pa((unsigned long)va);
@@ -484,7 +484,7 @@ unsigned int tmp;
regs = map_io(base, IOMMU_REGS); - if (regs == 0) { + if (regs == NULL) { DPRINTF("Cannot map IOMMU\n"); for (;;) { } } @@ -505,7 +505,7 @@ /* Allocate IOMMU page table */ /* Thremendous alignment causes great waste... */ ptsize = (t->vasize/PAGE_SIZE) * sizeof(int); - if ((ptab = mem_zalloc(&cmem, ptsize, ptsize)) == 0) { + if ((ptab = mem_zalloc(&cmem, ptsize, ptsize)) == NULL) { DPRINTF("Cannot allocate IOMMU table [0x%x]\n", ptsize); for (;;) { } }
Modified: openbios-devel/drivers/obio.c =================================================================== --- openbios-devel/drivers/obio.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/drivers/obio.c 2008-11-30 11:54:01 UTC (rev 274) @@ -325,7 +325,7 @@ }
static unsigned char *nvram; -ohwcfg_v3_t nv_info; +static ohwcfg_v3_t nv_info;
#define NVRAM_OB_START (sizeof(ohwcfg_v3_t) + sizeof(struct sparc_arch_cfg)) #define NVRAM_OB_SIZE ((NVRAM_IDPROM - NVRAM_OB_START) & ~15) @@ -807,15 +807,6 @@ static void ob_nvram_init(uint64_t base, uint64_t offset) { - extern uint32_t kernel_image; - extern uint32_t kernel_size; - extern uint32_t qemu_cmdline; - extern uint32_t cmdline_size; - extern char boot_device; - extern char obp_stdin, obp_stdout; - extern const char *obp_stdin_path, *obp_stdout_path; - extern uint16_t graphic_depth; - const char *stdin, *stdout; unsigned int i; char nographic;
Modified: openbios-devel/drivers/timer.c =================================================================== --- openbios-devel/drivers/timer.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/drivers/timer.c 2008-11-30 11:54:01 UTC (rev 274) @@ -79,7 +79,7 @@ * TODO: pass via lb table */
-unsigned long get_timer_freq() +unsigned long get_timer_freq(void) { return 100000000 / 4; }
Modified: openbios-devel/drivers/vga.h =================================================================== --- openbios-devel/drivers/vga.h 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/drivers/vga.h 2008-11-30 11:54:01 UTC (rev 274) @@ -14,6 +14,8 @@ #ifndef VGA_H_INCL #define VGA_H_INCL 1
+#include "video_subr.h" + //#include <cpu/p5/io.h>
#define u8 unsigned char @@ -226,9 +228,4 @@ __u32 vmode; /* interlaced etc */ __u32 reserved[6]; /* Reserved for future compatibility */ }; - -void vga_set_gmode (void); -void vga_set_amode (void); -void vga_font_load(unsigned char *vidmem, const unsigned char *font, int height, - int num_chars); #endif
Modified: openbios-devel/fs/grubfs/fsys_affs.c =================================================================== --- openbios-devel/fs/grubfs/fsys_affs.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/fs/grubfs/fsys_affs.c 2008-11-30 11:54:01 UTC (rev 274) @@ -235,10 +235,10 @@ #define rdsk(x) ((struct RigidDiskBlock *)(x)->blockbuffer) #define part(x) ((struct PartitionBlock *)(x)->blockbuffer)
-struct FSysBuffer *fsysb; -int blockoffset; /* offset if there is an embedded RDB partition */ -int rootb; /* block number of root block */ -int rdbb; /* block number of rdb block */ +static struct FSysBuffer *fsysb; +static int blockoffset; /* offset if there is an embedded RDB partition */ +static int rootb; /* block number of root block */ +static int rdbb; /* block number of rdb block */
static void initCache(void) { @@ -357,7 +357,7 @@ { disk_read_func = disk_read_hook; cblock = getBlock(block); - disk_read_func = 0; + disk_read_func = NULL; block = AROS_BE2LONG(extensionBlock(cblock)->extension); togo--; } @@ -383,7 +383,7 @@ len=fsysb->file.filesize-fsysb->file.current.offset; disk_read_func = disk_read_hook; cblock = getBlock(fsysb->file.current.block); - disk_read_func = 0; + disk_read_func = NULL; while (len) { disk_read_func = disk_read_hook; @@ -427,7 +427,7 @@ fsysb->file.current.byte = 0; fsysb->file.current.filekey--; } - disk_read_func = 0; + disk_read_func = NULL; len -= size; readbytes += size; } @@ -580,10 +580,9 @@ return 0; }
+#ifndef STAGE1_5 static void checkPossibility(char *filename, char *bstr) { - -#ifndef STAGE1_5 char cstr[32];
if (noCaseStrCmp(filename, bstr, 1)<=0) @@ -594,8 +593,10 @@ cstr[bstr[0]]=0; print_a_completion(cstr); } +} +#else +#define checkPossibility(a, b) do { } while(0) #endif -}
int affs_dir(char *dirname) {
Modified: openbios-devel/fs/grubfs/fsys_ext2fs.c =================================================================== --- openbios-devel/fs/grubfs/fsys_ext2fs.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/fs/grubfs/fsys_ext2fs.c 2008-11-30 11:54:01 UTC (rev 274) @@ -468,7 +468,7 @@ devread (map * (EXT2_BLOCK_SIZE (SUPERBLOCK) / DEV_BSIZE), offset, size, buf);
- disk_read_func = 0; + disk_read_func = NULL;
buf += size; len -= size;
Modified: openbios-devel/fs/grubfs/fsys_jfs.c =================================================================== --- openbios-devel/fs/grubfs/fsys_jfs.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/fs/grubfs/fsys_jfs.c 2008-11-30 11:54:01 UTC (rev 274) @@ -53,8 +53,8 @@ #define dtroot ((dtroot_t *)(&inode->di_btroot))
static ldtentry_t de_always[2] = { - {1, -1, 2, {'.', '.'}}, - {1, -1, 1, {'.'}} + {1, -1, 2, {'.', '.'}, 0}, + {1, -1, 1, {'.'}, 0} };
static int
Modified: openbios-devel/fs/grubfs/fsys_reiserfs.c =================================================================== --- openbios-devel/fs/grubfs/fsys_reiserfs.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/fs/grubfs/fsys_reiserfs.c 2008-11-30 11:54:01 UTC (rev 274) @@ -691,12 +691,12 @@ blockNr, depth); #endif /* REISERDEBUG */ if (! block_read (blockNr, 0, INFO->blocksize, cache)) - return 0; + return NULL; /* Make sure it has the right node level */ if (BLOCKHEAD (cache)->blk_level != depth) { errnum = ERR_FSYS_CORRUPT; - return 0; + return NULL; }
INFO->blocks[depth] = blockNr;
Modified: openbios-devel/fs/grubfs/fsys_ufs.c =================================================================== --- openbios-devel/fs/grubfs/fsys_ufs.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/fs/grubfs/fsys_ufs.c 2008-11-30 11:54:01 UTC (rev 274) @@ -94,7 +94,7 @@ char sbbuf[SBLOCKSIZE]; /* superblock */ char secbuf[DEV_BSIZE]; /* for MBR/disklabel */ }; -struct dmadat *dmadat = (struct dmadat*)FSYS_BUF; +static struct dmadat *dmadat = (struct dmadat*)FSYS_BUF;
#define SUPERBLOCK ((struct fs*)dmadat->sbbuf)
Modified: openbios-devel/fs/grubfs/fsys_vstafs.c =================================================================== --- openbios-devel/fs/grubfs/fsys_vstafs.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/fs/grubfs/fsys_vstafs.c 2008-11-30 11:54:01 UTC (rev 274) @@ -74,7 +74,7 @@ if (FILE_INFO->type != 2) { errnum = ERR_FILE_NOT_FOUND; - return 0; + return NULL; }
a1 = FILE_INFO->blocks; @@ -105,8 +105,8 @@ } else { - /* errnum =ERR_FILE_NOT_FOUND; */ - return 0; + /* errnum =ERR_FILE_NOT_FOUND; */ + return NULL; } }
Modified: openbios-devel/fs/grubfs/grubfs_fs.c =================================================================== --- openbios-devel/fs/grubfs/grubfs_fs.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/fs/grubfs/grubfs_fs.c 2008-11-30 11:54:01 UTC (rev 274) @@ -57,34 +57,34 @@
static const struct fsys_entry fsys_table[] = { # ifdef CONFIG_FSYS_FAT - {"fat", fat_mount, fat_read, fat_dir, 0, 0}, + {"fat", fat_mount, fat_read, fat_dir, NULL, NULL}, # endif # ifdef CONFIG_FSYS_EXT2FS - {"ext2fs", ext2fs_mount, ext2fs_read, ext2fs_dir, 0, 0}, + {"ext2fs", ext2fs_mount, ext2fs_read, ext2fs_dir, NULL, NULL}, # endif # ifdef CONFIG_FSYS_MINIX - {"minix", minix_mount, minix_read, minix_dir, 0, 0}, + {"minix", minix_mount, minix_read, minix_dir, NULL, NULL}, # endif # ifdef CONFIG_FSYS_REISERFS - {"reiserfs", reiserfs_mount, reiserfs_read, reiserfs_dir, 0, reiserfs_embed}, + {"reiserfs", reiserfs_mount, reiserfs_read, reiserfs_dir, NULL, reiserfs_embed}, # endif # ifdef CONFIG_FSYS_JFS - {"jfs", jfs_mount, jfs_read, jfs_dir, 0, jfs_embed}, + {"jfs", jfs_mount, jfs_read, jfs_dir, NULL, jfs_embed}, # endif # ifdef CONFIG_FSYS_XFS - {"xfs", xfs_mount, xfs_read, xfs_dir, 0, 0}, + {"xfs", xfs_mount, xfs_read, xfs_dir, NULL, NULL}, # endif # ifdef CONFIG_FSYS_UFS - {"ufs", ufs_mount, ufs_read, ufs_dir, 0, ufs_embed}, + {"ufs", ufs_mount, ufs_read, ufs_dir, NULL, ufs_embed}, # endif # ifdef CONFIG_FSYS_ISO9660 - {"iso9660", iso9660_mount, iso9660_read, iso9660_dir, 0, 0}, + {"iso9660", iso9660_mount, iso9660_read, iso9660_dir, NULL, NULL}, # endif # ifdef CONFIG_FSYS_NTFS - {"ntfs", ntfs_mount, ntfs_read, ntfs_dir, 0, 0}, + {"ntfs", ntfs_mount, ntfs_read, ntfs_dir, NULL, NULL}, # endif # ifdef CONFIG_FSYS_AFFS - {"affs", affs_mount, affs_read, affs_dir, 0, 0}, + {"affs", affs_mount, affs_read, affs_dir, NULL, NULL}, # endif };
@@ -157,9 +157,10 @@ grubfs_file_read( file_desc_t *fd, void *buf, size_t count ) { grubfile_t *file = (grubfile_t*)fd; - curfs = (grubfs_t *)file->fs->fs_data; - int ret; + int ret;
+ curfs = (grubfs_t *)file->fs->fs_data; + filepos=file->pos; filemax=file->len; @@ -186,8 +187,9 @@ open_path( fs_ops_t *fs, const char *path ) { grubfile_t *ret = NULL; + char *s = (char *)path; + curfs = (grubfs_t *)fs->fs_data; - char *s=(char *)path;
while(*s) { if(*s=='\') *s='/';
Modified: openbios-devel/fs/hfsplus/btree.c =================================================================== --- openbios-devel/fs/hfsplus/btree.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/fs/hfsplus/btree.c 2008-11-30 11:54:01 UTC (rev 274) @@ -114,12 +114,6 @@ { return (node_buf*) (cache->buffers + (i * cache->nodebufsize)); } - -/* flush the cache NYI */ -static void node_cache_flush(node_cache* cache) -{ - // NYI -}
/* flush the node at index */ static void node_cache_flush_node(node_cache* cache, int index) @@ -132,7 +126,6 @@ { if (!cache->entries) // not (fully) intialized ? return; - node_cache_flush(cache); free(cache->entries); }
Modified: openbios-devel/fs/hfsplus/include/libhfsp.h =================================================================== --- openbios-devel/fs/hfsplus/include/libhfsp.h 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/fs/hfsplus/include/libhfsp.h 2008-11-30 11:54:01 UTC (rev 274) @@ -27,7 +27,6 @@ # include "hfs.h" # include "hfsp.h"
-extern int errno; /* Last error is eventually found here */ extern const char *hfsp_error;
Modified: openbios-devel/fs/hfsplus/volume.c =================================================================== --- openbios-devel/fs/hfsplus/volume.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/fs/hfsplus/volume.c 2008-11-30 11:54:01 UTC (rev 274) @@ -114,8 +114,8 @@ * * ToDo: add more consitency checks. */ -static int -volume_readbuf(volume * vol, hfsp_vh* vh, char * p) +static int +volume_readbuf(hfsp_vh* vh, char * p) { if( (vh->signature = bswabU16_inc(p)) != HFSP_VOLHEAD_SIG) HFSP_ERROR(-1, "This is not a HFS+ volume"); @@ -159,7 +159,7 @@
if( volume_readinbuf(vol, buf, block)) return -1; - return volume_readbuf(vol, vh, buf); + return volume_readbuf(vh, buf); }
/* Find out wether the volume is wrapped and unwrap it eventually */ @@ -200,7 +200,7 @@ } else if( signature == HFSP_VOLHEAD_SIG) { /* Native HFS+ volume */ p = buf; // Restore to begin of block - return volume_readbuf(vol, vh, p); + return volume_readbuf(vh, p); } else HFSP_ERROR(-1, "Neither Wrapper nor native HFS+ volume header found"); fail:
Modified: openbios-devel/include/elf_boot.h =================================================================== --- openbios-devel/include/elf_boot.h 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/include/elf_boot.h 2008-11-30 11:54:01 UTC (rev 274) @@ -100,5 +100,6 @@ #define EB_IA64_IMAGE_HANDLE 0x00000007 #define EB_I386_MEMMAP 0x00000008
+extern const struct elf_image_note elf_image_notes;
#endif /* ELF_BOOT_H */
Modified: openbios-devel/include/libc/string.h =================================================================== --- openbios-devel/include/libc/string.h 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/include/libc/string.h 2008-11-30 11:54:01 UTC (rev 274) @@ -17,6 +17,8 @@ #ifndef _H_STRING #define _H_STRING
+#include "openbios/config.h" + #define bzero(s,n) memset( s, 0, n ) #define atol(nptr) strtol(nptr, NULL, 10 )
@@ -95,5 +97,6 @@ #define tolower(c) __tolower(c) #define toupper(c) __toupper(c)
+extern int errno_int;
#endif /* _H_STRING */
Modified: openbios-devel/include/openbios/drivers.h =================================================================== --- openbios-devel/include/openbios/drivers.h 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/include/openbios/drivers.h 2008-11-30 11:54:01 UTC (rev 274) @@ -13,6 +13,7 @@
#ifdef CONFIG_DRIVER_PCI int ob_pci_init(void); +void macio_nvram_init(char *path, uint32_t addr); #endif #ifdef CONFIG_DRIVER_SBUS int ob_sbus_init(uint64_t base, int machine_id); @@ -38,6 +39,17 @@ int start_cpu(unsigned int pc, unsigned int context_ptr, unsigned int context, int cpu); extern struct mem cmem; +extern uint16_t graphic_depth; +extern volatile unsigned char *power_reg; +extern volatile unsigned int *reset_reg; +extern const char *obp_stdin_path, *obp_stdout_path; +extern char obp_stdin, obp_stdout; +extern volatile struct sun4m_timer_regs *counter_regs; +extern uint32_t kernel_image; +extern uint32_t kernel_size; +extern uint32_t qemu_cmdline; +extern uint32_t cmdline_size; +extern char boot_device; #endif #ifdef CONFIG_DRIVER_FLOPPY int ob_floppy_init(void);
Modified: openbios-devel/kernel/dict.c =================================================================== --- openbios-devel/kernel/dict.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/kernel/dict.c 2008-11-30 11:54:01 UTC (rev 274) @@ -18,7 +18,7 @@ #include "cross.h"
-unsigned char *dict = 0; +unsigned char *dict = NULL; ucell *last; cell dicthead = 0;
Modified: openbios-devel/kernel/internal.c =================================================================== --- openbios-devel/kernel/internal.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/kernel/internal.c 2008-11-30 11:54:01 UTC (rev 274) @@ -24,7 +24,7 @@ * point behind the pointer. */ static ucell t[] = { DOCOL, 0, (ucell)(t+3), 0 }; -ucell *trampoline = t; +static ucell *trampoline = t; #endif
#ifndef CONFIG_DEBUG_INTERPRETER @@ -287,7 +287,7 @@ #ifndef FCOMPILER static ucell get_myself(void) { - static ucell **myself = 0; + static ucell **myself = NULL; if( !myself ) myself = (ucell**)findword("my-self") + 1; return (*myself && **myself) ? (ucell)**myself : 0;
Modified: openbios-devel/libc/misc.c =================================================================== --- openbios-devel/libc/misc.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/libc/misc.c 2008-11-30 11:54:01 UTC (rev 274) @@ -17,7 +17,7 @@ #include "openbios/config.h" #include "libc/string.h"
-int errno; +int errno_int;
void qsort( void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void*) )
Modified: openbios-devel/libc/string.c =================================================================== --- openbios-devel/libc/string.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/libc/string.c 2008-11-30 11:54:01 UTC (rev 274) @@ -50,7 +50,7 @@ return (int)c1 - (int)c2; }
-char * ___strtok; +static char * ___strtok;
/** * strcpy - Copy a %NUL terminated string
Modified: openbios-devel/libc/vsprintf.c =================================================================== --- openbios-devel/libc/vsprintf.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/libc/vsprintf.c 2008-11-30 11:54:01 UTC (rev 274) @@ -63,7 +63,7 @@ if (type & LEFT) type &= ~ZEROPAD; if (base < 2 || base > 36) - return 0; + return NULL; c = (type & ZEROPAD) ? '0' : ' '; sign = 0; if (type & SIGN) {
Modified: openbios-devel/modules/cmdline.c =================================================================== --- openbios-devel/modules/cmdline.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/modules/cmdline.c 2008-11-30 11:54:01 UTC (rev 274) @@ -120,7 +120,7 @@
ci->buf[0] = 0; if( !p ) - return 0; + return NULL;
for( len=0; len <= ci->ncol && p[len] != '\n' && p[len] ; len++ ) ;
Modified: openbios-devel/modules/video.c =================================================================== --- openbios-devel/modules/video.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/modules/video.c 2008-11-30 11:54:01 UTC (rev 274) @@ -41,11 +41,13 @@ static void startup_splash( void ) { +#ifdef CONFIG_MOL int fd, s, i, y, x, dx, dy; int width, height; char *pp, *p; char buf[64]; - +#endif + /* only draw logo in 24-bit mode (for now) */ if( video.fb.depth < 15 ) return; @@ -247,7 +249,7 @@ video_write(void) { char *addr; - int i, len; + int len;
len = GETTOS(); addr = pop_fstr_copy();