[OpenBIOS] r273 - in openbios-devel: arch/sparc32 arch/sparc64 drivers fs/grubfs fs/hfsplus include include/openbios libc
svn at openbios.org
svn at openbios.org
Sat Nov 29 20:31:28 CET 2008
Author: blueswirl
Date: 2008-11-29 20:31:28 +0100 (Sat, 29 Nov 2008)
New Revision: 273
Modified:
openbios-devel/arch/sparc32/elfload.c
openbios-devel/arch/sparc32/romvec.c
openbios-devel/arch/sparc64/elfload.c
openbios-devel/arch/sparc64/openbios.c
openbios-devel/drivers/floppy.c
openbios-devel/drivers/obio.c
openbios-devel/drivers/vga.h
openbios-devel/fs/grubfs/dir.h
openbios-devel/fs/grubfs/fsys_affs.c
openbios-devel/fs/grubfs/fsys_ext2fs.c
openbios-devel/fs/grubfs/fsys_vstafs.c
openbios-devel/fs/grubfs/fsys_xfs.c
openbios-devel/fs/hfsplus/btree.c
openbios-devel/fs/hfsplus/hfsp_fs.c
openbios-devel/fs/hfsplus/unicode.c
openbios-devel/fs/hfsplus/volume.c
openbios-devel/include/ofmem.h
openbios-devel/include/openbios/firmware_abi.h
openbios-devel/libc/diskio.c
Log:
Reduce warnings by 29%
Modified: openbios-devel/arch/sparc32/elfload.c
===================================================================
--- openbios-devel/arch/sparc32/elfload.c 2008-11-29 16:24:51 UTC (rev 272)
+++ openbios-devel/arch/sparc32/elfload.c 2008-11-29 19:31:28 UTC (rev 273)
@@ -308,7 +308,7 @@
Elf_phdr *phdr = NULL;
unsigned long phdr_size;
unsigned long checksum_offset;
- unsigned short checksum;
+ unsigned short checksum = 0;
Elf_Bhdr *boot_notes = NULL;
int retval = -1;
int image_retval;
Modified: openbios-devel/arch/sparc32/romvec.c
===================================================================
--- openbios-devel/arch/sparc32/romvec.c 2008-11-29 16:24:51 UTC (rev 272)
+++ openbios-devel/arch/sparc32/romvec.c 2008-11-29 19:31:28 UTC (rev 273)
@@ -265,9 +265,9 @@
for (;;) {}
}
+extern volatile unsigned char *power_reg;
static void obp_abort(void)
{
- extern volatile unsigned char *power_reg;
printk("abort, power off\n");
*power_reg = 1;
@@ -277,8 +277,6 @@
static void obp_halt(void)
{
- extern volatile unsigned char *power_reg;
-
printk("halt, power off\n");
*power_reg = 1;
printk("power off failed\n");
Modified: openbios-devel/arch/sparc64/elfload.c
===================================================================
--- openbios-devel/arch/sparc64/elfload.c 2008-11-29 16:24:51 UTC (rev 272)
+++ openbios-devel/arch/sparc64/elfload.c 2008-11-29 19:31:28 UTC (rev 273)
@@ -307,7 +307,7 @@
Elf_phdr *phdr = NULL;
unsigned long phdr_size;
unsigned long checksum_offset;
- unsigned short checksum;
+ unsigned short checksum = 0;
Elf_Bhdr *boot_notes = NULL;
int retval = -1;
int image_retval;
Modified: openbios-devel/arch/sparc64/openbios.c
===================================================================
--- openbios-devel/arch/sparc64/openbios.c 2008-11-29 16:24:51 UTC (rev 272)
+++ openbios-devel/arch/sparc64/openbios.c 2008-11-29 19:31:28 UTC (rev 273)
@@ -58,14 +58,12 @@
static const struct hwdef hwdefs[] = {
{
- .pci.cfg_addr = PCI_CONFIG,
- .pci.cfg_data = 0,
- .pci.cfg_base = 0x80000000ULL,
- .pci.cfg_len = 0,
- .pci.mem_base = 0,
- .pci.mem_len = 0,
- .pci.io_base = 0,
- .pci.io_len = 0,
+ .pci = {
+ .cfg_addr = PCI_CONFIG,
+ .cfg_data = 0,
+ .cfg_base = 0x80000000ULL,
+ .cfg_len = 0,
+ },
.machine_id_low = 0,
.machine_id_high = 255,
},
Modified: openbios-devel/drivers/floppy.c
===================================================================
--- openbios-devel/drivers/floppy.c 2008-11-29 16:24:51 UTC (rev 272)
+++ openbios-devel/drivers/floppy.c 2008-11-29 19:31:28 UTC (rev 273)
@@ -223,7 +223,7 @@
static void floppy_reset(void);
-static int set_dor(int fdc, char mask, char data)
+static int set_dor(char mask, char data)
{
unsigned char newdor,olddor;
@@ -236,15 +236,6 @@
return olddor;
}
-
-static void bounce_motor(void)
-{
- /* Bounce the drive motor... */
- outb(fdc_state.dor & ~(0x10<<FD_DRIVE), FD_DOR);
- outb(fdc_state.dor, FD_DOR);
-}
-
-
/* waits until the fdc becomes ready */
static int wait_til_ready(void)
{
@@ -408,7 +399,7 @@
#endif
new_dor |= (1 << (drive + 4)); /* Spinup the selected drive */
new_dor |= drive; /* Select the drive for commands as well */
- set_dor(fdc, 0xc, new_dor);
+ set_dor(0xc, new_dor);
mdelay(DRIVE_H1440_SPINUP);
@@ -432,7 +423,7 @@
mask = 0xff;
mask &= ~(1 << (drive +4));
/* Now clear the bit in the Digital Output Register */
- set_dor(0, mask, 0);
+ set_dor(mask, 0);
}
/* Set the FDC's data transfer rate on behalf of the specified drive.
@@ -523,7 +514,6 @@
case 1:
dtr = 300;
if (fdc_state.version >= FDC_82078) {
- unsigned char cmd[3];
/* chose the default rate table, not the one
* where 1 = 2 Mbps */
cmd[0] = FD_DRIVESPEC;
@@ -553,9 +543,6 @@
if (srt > 0xf) {
srt = 0xf;
}
- if (srt < 0 ) {
- srt = 0;
- }
hlt = (head_load_time*scale_dtr/2 + NOMINAL_DTR - 1)/NOMINAL_DTR;
if (hlt < 0x01)
@@ -726,7 +713,6 @@
if (success)
drive_state[FD_DRIVE].track = track;
else {
- int i;
printk_debug("seek failed\n");
printk_debug("nr = %d\n", nr);
printk_debug("ST0 = %02x\n", reply[0]);
@@ -906,21 +892,23 @@
return -1;
}
-int floppy_read(char *dest, unsigned long offset, unsigned long length)
+static int floppy_read(char *dest, unsigned long offset, unsigned long length)
{
- int result, bytes_read;;
+ int fr_result, bytes_read;;
+
printk_debug("floppy_read\n");
bytes_read = 0;
do {
int max_errors = 3;
do {
- result = __floppy_read(dest + bytes_read, offset, length - bytes_read);
+ fr_result = __floppy_read(dest + bytes_read, offset,
+ length - bytes_read);
if (max_errors-- == 0) {
return (bytes_read)?bytes_read: -1;
}
- } while (result <= 0);
- offset += result;
- bytes_read += result;
+ } while (fr_result <= 0);
+ offset += fr_result;
+ bytes_read += fr_result;
} while(bytes_read < length);
return bytes_read;
}
@@ -1005,7 +993,7 @@
} /* get_fdc_version */
-int floppy_init(void)
+static int floppy_init(void)
{
printk_debug("floppy_init\n");
fdc_state.in_sync = 0;
@@ -1041,13 +1029,6 @@
fdc_state.in_sync = 1;
}
-void floppy_fini(void)
-{
- /* Disable the floppy and the floppy drive controller */
- set_dor(0, 0, 0);
-}
-
-
static void
ob_floppy_initialize(int *idx)
{
@@ -1068,7 +1049,7 @@
static void
ob_floppy_open(int *idx)
{
- int ret=1, len;
+ int ret = 1;
phandle_t ph;
fword("my-unit");
Modified: openbios-devel/drivers/obio.c
===================================================================
--- openbios-devel/drivers/obio.c 2008-11-29 16:24:51 UTC (rev 272)
+++ openbios-devel/drivers/obio.c 2008-11-29 19:31:28 UTC (rev 273)
@@ -831,7 +831,7 @@
ob_new_obio_device("eeprom", NULL);
- nvram = (char *)ob_reg(base, offset, NVRAM_SIZE, 1);
+ nvram = (unsigned char *)ob_reg(base, offset, NVRAM_SIZE, 1);
PUSH((unsigned long)nvram);
fword("encode-int");
Modified: openbios-devel/drivers/vga.h
===================================================================
--- openbios-devel/drivers/vga.h 2008-11-29 16:24:51 UTC (rev 272)
+++ openbios-devel/drivers/vga.h 2008-11-29 19:31:28 UTC (rev 273)
@@ -227,4 +227,8 @@
__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/dir.h
===================================================================
--- openbios-devel/fs/grubfs/dir.h 2008-11-29 16:24:51 UTC (rev 272)
+++ openbios-devel/fs/grubfs/dir.h 2008-11-29 19:31:28 UTC (rev 273)
@@ -137,11 +137,5 @@
#ifndef NULL
#define NULL 0
#endif
-extern DIR *opendir ();
-extern struct direct *readdir ();
-extern int telldir ();
-extern void seekdir ();
-#define rewinddir(dirp) seekdir((dirp), (long)0)
-extern void closedir ();
#endif /* not KERNEL */
#endif /* _BOOT_UFS_DIR_H_ */
Modified: openbios-devel/fs/grubfs/fsys_affs.c
===================================================================
--- openbios-devel/fs/grubfs/fsys_affs.c 2008-11-29 16:24:51 UTC (rev 272)
+++ openbios-devel/fs/grubfs/fsys_affs.c 2008-11-29 19:31:28 UTC (rev 273)
@@ -56,7 +56,7 @@
unsigned long pb_Flags;
unsigned long pb_Reserved1[2];
unsigned long pb_DevFlags;
- unsigned char pb_DriveName[32];
+ char pb_DriveName[32];
unsigned long pb_Reserved2[15];
unsigned long pb_Environment[20];
unsigned long pb_EReserved[12];
@@ -201,7 +201,7 @@
unsigned int filesize;
};
-#warning "Big vs. little endian for configure needed"
+//#warning "Big vs. little endian for configure needed"
#define AROS_BE2LONG(l) \
( \
((((unsigned long)(l)) >> 24) & 0x000000FFUL) | \
@@ -240,7 +240,8 @@
int rootb; /* block number of root block */
int rdbb; /* block number of rdb block */
-void initCache() {
+static void initCache(void)
+{
int i;
for (i=0;i<MAX_CACHE_BLOCKS;i++)
@@ -251,7 +252,8 @@
}
}
-struct CacheBlock *getBlock(unsigned int block) {
+static struct CacheBlock *getBlock(unsigned int block)
+{
struct CacheBlock *freeblock;
int i;
@@ -278,7 +280,8 @@
return freeblock;
}
-unsigned int calcChkSum(unsigned short SizeBlock, unsigned int *buffer) {
+static unsigned int calcChkSum(unsigned short SizeBlock, unsigned int *buffer)
+{
unsigned int sum=0,count=0;
for (count=0;count<SizeBlock;count++)
@@ -337,7 +340,8 @@
return 1;
}
-int seek(unsigned long offset) {
+static int seek(unsigned long offset)
+{
struct CacheBlock *cblock;
unsigned long block;
unsigned long togo;
@@ -391,7 +395,7 @@
{
cblock = getBlock(fsysb->file.current.block);
}
-#warning "else shouldn't occour"
+ //#warning "else shouldn't occour"
}
size = 512;
size -= fsysb->file.current.byte;
@@ -405,7 +409,7 @@
extensionBlock(cblock)->filekey_table
[fsysb->file.current.filekey]
)+blockoffset,
- fsysb->file.current.byte, size, (char *)((int)buf+readbytes)
+ fsysb->file.current.byte, size, (char *)((long)buf+readbytes)
);
fsysb->file.current.byte += size;
}
@@ -418,7 +422,7 @@
extensionBlock(cblock)->filekey_table
[fsysb->file.current.filekey]
)+blockoffset,
- fsysb->file.current.byte, size, (char *)((int)buf+readbytes)
+ fsysb->file.current.byte, size, (char *)((long)buf+readbytes)
);
fsysb->file.current.byte = 0;
fsysb->file.current.filekey--;
@@ -432,7 +436,8 @@
return readbytes;
}
-unsigned char capitalch(unsigned char ch, unsigned char flags) {
+static unsigned char capitalch(unsigned char ch, unsigned char flags)
+{
if ((flags==0) || (flags==1))
return (unsigned char)((ch>='a') && (ch<='z') ? ch-('a'-'A') : ch);
@@ -442,7 +447,8 @@
}
// str2 is a BCPL string
-int noCaseStrCmp(char *str1, char *str2, unsigned char flags) {
+static int noCaseStrCmp(char *str1, char *str2, unsigned char flags)
+{
unsigned char length;
length=str2++[0];
@@ -456,7 +462,8 @@
return (*str1) ? 1 : -1;
}
-unsigned int getHashKey(char *name,unsigned int tablesize, unsigned char flags) {
+static unsigned int getHashKey(char *name,unsigned int tablesize, unsigned char flags)
+{
unsigned int length;
length=0;
@@ -467,7 +474,8 @@
return length%tablesize;
}
-grub_error_t getHeaderBlock(char *name, struct CacheBlock **dirh) {
+static grub_error_t getHeaderBlock(char *name, struct CacheBlock **dirh)
+{
int key;
key = getHashKey(name, 72, 1);
@@ -501,8 +509,8 @@
return 0;
}
-char *copyPart(char *src, char *dst) {
-
+static char *copyPart(char *src, char *dst)
+{
while ((*src != '/') && (*src))
*dst++ = *src++;
if (*src == '/')
@@ -514,7 +522,8 @@
return src;
}
-grub_error_t findBlock(char *name, struct CacheBlock **dirh) {
+static grub_error_t findBlock(char *name, struct CacheBlock **dirh)
+{
char dname[32];
int block;
@@ -571,7 +580,8 @@
return 0;
}
-void checkPossibility(char *filename, char *bstr) {
+static void checkPossibility(char *filename, char *bstr)
+{
#ifndef STAGE1_5
char cstr[32];
@@ -668,7 +678,7 @@
fname = filename;
while (*fname)
*current++ = *fname++;
-#warning "TODO: add some more chars until posibilities differ"
+ //#warning "TODO: add some more chars until possibilities differ"
if (print_possibilities>0)
errnum = ERR_FILE_NOT_FOUND;
return (print_possibilities<0);
Modified: openbios-devel/fs/grubfs/fsys_ext2fs.c
===================================================================
--- openbios-devel/fs/grubfs/fsys_ext2fs.c 2008-11-29 16:24:51 UTC (rev 272)
+++ openbios-devel/fs/grubfs/fsys_ext2fs.c 2008-11-29 19:31:28 UTC (rev 273)
@@ -587,7 +587,7 @@
log2 (EXT2_BLOCK_SIZE (SUPERBLOCK) / sizeof (struct ext2_inode)));
printf ("ext2fs_dir: inode table fsblock=%d\n", ino_blk);
#endif /* E2DEBUG */
- if (!ext2_rdfsb (ino_blk, INODE))
+ if (!ext2_rdfsb (ino_blk, (char *)INODE))
{
return 0;
}
Modified: openbios-devel/fs/grubfs/fsys_vstafs.c
===================================================================
--- openbios-devel/fs/grubfs/fsys_vstafs.c 2008-11-29 16:24:51 UTC (rev 272)
+++ openbios-devel/fs/grubfs/fsys_vstafs.c 2008-11-29 19:31:28 UTC (rev 273)
@@ -30,8 +30,8 @@
#define FIRST_SECTOR ((struct first_sector *) FSYS_BUF)
-#define FILE_INFO ((struct fs_file *) (int) FIRST_SECTOR + 8192)
-#define DIRECTORY_BUF ((struct dir_entry *) (int) FILE_INFO + 512)
+#define FILE_INFO ((struct fs_file *) (long) FIRST_SECTOR + 8192)
+#define DIRECTORY_BUF ((struct dir_entry *) (long) FILE_INFO + 512)
#define ROOT_SECTOR 1
@@ -39,7 +39,6 @@
* In f_sector we store the sector number in which the information about
* the found file is.
*/
-extern int filepos;
static int f_sector;
int
@@ -63,7 +62,7 @@
}
static int curr_ext, current_direntry, current_blockpos;
-static struct alloc *a;
+static struct alloc *a1;
static struct dir_entry *
vstafs_readdir (long sector)
@@ -78,9 +77,9 @@
return 0;
}
- a = FILE_INFO->blocks;
+ a1 = FILE_INFO->blocks;
curr_ext = 0;
- devread (a[curr_ext].a_start, 0, 512, (char *) DIRECTORY_BUF);
+ devread (a1[curr_ext].a_start, 0, 512, (char *) DIRECTORY_BUF);
current_direntry = 11;
current_blockpos = 0;
@@ -93,7 +92,7 @@
if (current_direntry > 15)
{
current_direntry = 0;
- if (++current_blockpos > (a[curr_ext].a_len - 1))
+ if (++current_blockpos > (a1[curr_ext].a_len - 1))
{
current_blockpos = 0;
curr_ext++;
@@ -101,8 +100,8 @@
if (curr_ext < FILE_INFO->extents)
{
- devread (a[curr_ext].a_start + current_blockpos, 0,
- 512, (char *) DIRECTORY_BUF);
+ devread (a1[curr_ext].a_start + current_blockpos, 0,
+ 512, (char *) DIRECTORY_BUF);
}
else
{
@@ -188,35 +187,35 @@
int
vstafs_read (char *addr, int len)
{
- struct alloc *a;
+ struct alloc *a2;
int size, ret = 0, offset, curr_len = 0;
- int curr_ext;
+ int curr_ext2;
char extent;
int ext_size;
char *curr_pos;
get_file_info (f_sector);
size = FILE_INFO->len-VSTAFS_START_DATA;
- a = FILE_INFO->blocks;
+ a2 = FILE_INFO->blocks;
if (filepos > 0)
{
- if (filepos < a[0].a_len * 512 - VSTAFS_START_DATA)
+ if (filepos < a2[0].a_len * 512 - VSTAFS_START_DATA)
{
offset = filepos + VSTAFS_START_DATA;
extent = 0;
- curr_len = a[0].a_len * 512 - offset - filepos;
+ curr_len = a2[0].a_len * 512 - offset - filepos;
}
else
{
- ext_size = a[0].a_len * 512 - VSTAFS_START_DATA;
+ ext_size = a2[0].a_len * 512 - VSTAFS_START_DATA;
offset = filepos - ext_size;
extent = 1;
do
{
curr_len -= ext_size;
offset -= ext_size;
- ext_size = a[extent+1].a_len * 512;
+ ext_size = a2[extent+1].a_len * 512;
}
while (extent < FILE_INFO->extents && offset>ext_size);
}
@@ -225,16 +224,16 @@
{
offset = VSTAFS_START_DATA;
extent = 0;
- curr_len = a[0].a_len * 512 - offset;
+ curr_len = a2[0].a_len * 512 - offset;
}
curr_pos = addr;
if (curr_len > len)
curr_len = len;
- for (curr_ext=extent;
- curr_ext < FILE_INFO->extents;
- curr_len = a[curr_ext].a_len * 512, curr_pos += curr_len, curr_ext++)
+ for (curr_ext2=extent;
+ curr_ext2 < FILE_INFO->extents;
+ curr_len = a2[curr_ext].a_len * 512, curr_pos += curr_len, curr_ext2++)
{
ret += curr_len;
size -= curr_len;
@@ -244,7 +243,7 @@
curr_len += size;
}
- devread (a[curr_ext].a_start,offset, curr_len, curr_pos);
+ devread (a2[curr_ext2].a_start,offset, curr_len, curr_pos);
offset = 0;
}
Modified: openbios-devel/fs/grubfs/fsys_xfs.c
===================================================================
--- openbios-devel/fs/grubfs/fsys_xfs.c 2008-11-29 16:24:51 UTC (rev 272)
+++ openbios-devel/fs/grubfs/fsys_xfs.c 2008-11-29 19:31:28 UTC (rev 273)
@@ -97,7 +97,7 @@
return ino & XFS_INO_MASK(XFS_INO_OFFSET_BITS);
}
-static inline __const__ __uint16_t
+static inline __uint16_t
le16 (__uint16_t x)
{
#ifdef __i386__
@@ -110,7 +110,7 @@
#endif
}
-static inline __const__ __uint32_t
+static inline __uint32_t
le32 (__uint32_t x)
{
#ifdef __i386__
@@ -130,7 +130,7 @@
#endif
}
-static inline __const__ __uint64_t
+static inline __uint64_t
le64 (__uint64_t x)
{
__uint32_t h = x >> 32;
@@ -195,7 +195,7 @@
}
#undef offsetof
-#define offsetof(t,m) ((int)&(((t *)0)->m))
+#define offsetof(t,m) ((long)&(((t *)0)->m))
static inline int
btroot_maxrecs (void)
Modified: openbios-devel/fs/hfsplus/btree.c
===================================================================
--- openbios-devel/fs/hfsplus/btree.c 2008-11-29 16:24:51 UTC (rev 272)
+++ openbios-devel/fs/hfsplus/btree.c 2008-11-29 19:31:28 UTC (rev 273)
@@ -38,7 +38,7 @@
*
* return pointer after reading the structure
*/
-static void* btree_readnode(btree* bt, btree_node_desc* node, void *p)
+static void* btree_readnode(btree_node_desc* node, void *p)
{
node->next = bswabU32_inc(p);
node->prev = bswabU32_inc(p);
@@ -53,7 +53,7 @@
*
* return pointer after reading the structure
*/
-static void* btree_readhead(btree* bt, btree_head* head, void *p)
+static void* btree_readhead(btree_head* head, void *p)
{
UInt32 *q;
head->depth = bswabU16_inc(p);
@@ -153,7 +153,7 @@
return NULL; // evil ...
result->index = node_index;
- btree_readnode(bt, &result->desc, p);
+ btree_readnode(&result->desc, p);
e -> priority = result->desc.height * DEPTH_FACTOR;
e -> index = node_index;
@@ -229,10 +229,10 @@
HFSP_EXTENT_DATA, bt->cnid);
if (!p)
return -1;
- p = btree_readnode(bt, &node, p);
+ p = btree_readnode(&node, p);
if (node.kind != HFSP_NODE_HEAD)
return -1; // should not happen ?
- p = btree_readhead(bt, &bt->head, p);
+ p = btree_readhead(&bt->head, p);
node_size = bt->head.node_size;
bt->blkpernode = node_size / vol->blksize;
Modified: openbios-devel/fs/hfsplus/hfsp_fs.c
===================================================================
--- openbios-devel/fs/hfsplus/hfsp_fs.c 2008-11-29 16:24:51 UTC (rev 272)
+++ openbios-devel/fs/hfsplus/hfsp_fs.c 2008-11-29 19:31:28 UTC (rev 273)
@@ -98,7 +98,7 @@
static int
match_file( record *r, record *parent, const void *match_data, hfsp_file_t *pt )
{
- unsigned char *p = (char*)match_data;
+ const char *p = (const char*)match_data;
char name[256];
int ret=1;
@@ -340,7 +340,7 @@
max -= t->pos - curpos;
}
size = (count-act_count > max)? max : count-act_count;
- memcpy( buf + act_count, &buf2[add], size );
+ memcpy( (char *)buf + act_count, &buf2[add], size );
curpos += blksize;
act_count += size;
Modified: openbios-devel/fs/hfsplus/unicode.c
===================================================================
--- openbios-devel/fs/hfsplus/unicode.c 2008-11-29 16:24:51 UTC (rev 272)
+++ openbios-devel/fs/hfsplus/unicode.c 2008-11-29 19:31:28 UTC (rev 273)
@@ -79,8 +79,8 @@
register UInt16 length1 = ustr1->strlen;
register UInt16 length2 = ustr2->strlen;
register const UInt16* lowerCaseTable = gLowerCaseTable;
- register UInt16* str1 = ustr1->name;
- register UInt16* str2 = ustr2->name;
+ register const UInt16* str1 = ustr1->name;
+ register const UInt16* str2 = ustr2->name;
while (1) {
// Set default values for c1, c2 in case there are no more valid chars
Modified: openbios-devel/fs/hfsplus/volume.c
===================================================================
--- openbios-devel/fs/hfsplus/volume.c 2008-11-29 16:24:51 UTC (rev 272)
+++ openbios-devel/fs/hfsplus/volume.c 2008-11-29 19:31:28 UTC (rev 273)
@@ -115,7 +115,7 @@
* ToDo: add more consitency checks.
*/
static int
-volume_readbuf(volume * vol, hfsp_vh* vh, void* p)
+volume_readbuf(volume * vol, hfsp_vh* vh, char * p)
{
if( (vh->signature = bswabU16_inc(p)) != HFSP_VOLHEAD_SIG)
HFSP_ERROR(-1, "This is not a HFS+ volume");
@@ -168,7 +168,7 @@
{
UInt16 signature;
char buf[vol->blksize];
- void *p = buf;
+ char *p = buf;
if( volume_readinbuf(vol, buf, 2) ) // Wrapper or volume header starts here
return -1;
Modified: openbios-devel/include/ofmem.h
===================================================================
--- openbios-devel/include/ofmem.h 2008-11-29 16:24:51 UTC (rev 272)
+++ openbios-devel/include/ofmem.h 2008-11-29 19:31:28 UTC (rev 273)
@@ -29,10 +29,4 @@
extern void ofmem_release( ulong virt, ulong size );
extern ulong ofmem_translate( ulong virt, ulong *ret_mode );
-/* allocations from the private pool */
-extern void *malloc( int size );
-extern void free( void *ptr );
-extern void *realloc( void *ptr, size_t size );
-
-
#endif /* _H_OFMEM */
Modified: openbios-devel/include/openbios/firmware_abi.h
===================================================================
--- openbios-devel/include/openbios/firmware_abi.h 2008-11-29 16:24:51 UTC (rev 272)
+++ openbios-devel/include/openbios/firmware_abi.h 2008-11-29 19:31:28 UTC (rev 273)
@@ -139,7 +139,7 @@
}
static inline uint32_t
-OpenBIOS_set_var(uint8_t *nvram, uint32_t addr, const unsigned char *str)
+OpenBIOS_set_var(uint8_t *nvram, uint32_t addr, const char *str)
{
uint32_t len;
Modified: openbios-devel/libc/diskio.c
===================================================================
--- openbios-devel/libc/diskio.c 2008-11-29 16:24:51 UTC (rev 272)
+++ openbios-devel/libc/diskio.c 2008-11-29 19:31:28 UTC (rev 273)
@@ -108,7 +108,7 @@
push_str( filename );
call_package( fdp->reopen_xt, fdp->ih );
- ret = (POP() == -1)? 0:-1;
+ ret = (POP() == (ucell)-1)? 0 : -1;
return ret;
}
@@ -121,7 +121,7 @@
if( lookup_xt(fdp->ih, "open-nwrom", &fdp->open_nwrom_xt) )
return -1;
call_package( fdp->open_nwrom_xt, fdp->ih );
- return (POP() == -1)? 0:-1;
+ return (POP() == (ucell)-1)? 0 : -1;
}
ihandle_t
More information about the OpenBIOS
mailing list