summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386
diff options
context:
space:
mode:
authorgleb <gleb@FreeBSD.org>2012-05-25 09:36:39 +0000
committergleb <gleb@FreeBSD.org>2012-05-25 09:36:39 +0000
commit2dc26af4447ddf75f00ee32933b59022bffa31a6 (patch)
treeb96ac54d1a86e70ab6e3af1f4c959eee6dc450ac /sys/boot/i386
parent02feec4a4507f678cfd5036cbb906dcc9908b6ba (diff)
downloadFreeBSD-src-2dc26af4447ddf75f00ee32933b59022bffa31a6.zip
FreeBSD-src-2dc26af4447ddf75f00ee32933b59022bffa31a6.tar.gz
Use 32-bit ufs_ino_t instead of ino_t to keep boot2 small and prevent
unnecessary 64-bit math on 32-bit machines. Sponsored by: Google Summer of Code 2011
Diffstat (limited to 'sys/boot/i386')
-rw-r--r--sys/boot/i386/boot2/boot2.c7
-rw-r--r--sys/boot/i386/gptboot/gptboot.c7
2 files changed, 6 insertions, 8 deletions
diff --git a/sys/boot/i386/boot2/boot2.c b/sys/boot/i386/boot2/boot2.c
index d5ac39e..a0779e0 100644
--- a/sys/boot/i386/boot2/boot2.c
+++ b/sys/boot/i386/boot2/boot2.c
@@ -138,7 +138,6 @@ static uint8_t ioctrl = IO_KEYBOARD;
void exit(int);
static void load(void);
static int parse(void);
-static int xfsread(ino_t, void *, size_t);
static int dskread(void *, unsigned, unsigned);
static void printf(const char *,...);
static void putchar(int);
@@ -170,7 +169,7 @@ strcmp(const char *s1, const char *s2)
#include "ufsread.c"
static inline int
-xfsread(ino_t inode, void *buf, size_t nbyte)
+xfsread(ufs_ino_t inode, void *buf, size_t nbyte)
{
if ((size_t)fsread(inode, buf, nbyte) != nbyte) {
printf("Invalid %s\n", "format");
@@ -222,7 +221,7 @@ int
main(void)
{
uint8_t autoboot;
- ino_t ino;
+ ufs_ino_t ino;
size_t nbyte;
dmadat = (void *)(roundup2(__base + (int32_t)&_end, 0x10000) - __base);
@@ -307,7 +306,7 @@ load(void)
static Elf32_Phdr ep[2];
static Elf32_Shdr es[2];
caddr_t p;
- ino_t ino;
+ ufs_ino_t ino;
uint32_t addr;
int i, j;
diff --git a/sys/boot/i386/gptboot/gptboot.c b/sys/boot/i386/gptboot/gptboot.c
index 8cb4136..b976378 100644
--- a/sys/boot/i386/gptboot/gptboot.c
+++ b/sys/boot/i386/gptboot/gptboot.c
@@ -90,14 +90,13 @@ static struct bootinfo bootinfo;
void exit(int);
static void load(void);
static int parse(char *, int *);
-static int xfsread(ino_t, void *, size_t);
static int dskread(void *, daddr_t, unsigned);
static uint32_t memsize(void);
#include "ufsread.c"
static inline int
-xfsread(ino_t inode, void *buf, size_t nbyte)
+xfsread(ufs_ino_t inode, void *buf, size_t nbyte)
{
if ((size_t)fsread(inode, buf, nbyte) != nbyte) {
@@ -138,7 +137,7 @@ main(void)
{
char cmd[512], cmdtmp[512];
int autoboot, dskupdated;
- ino_t ino;
+ ufs_ino_t ino;
dmadat = (void *)(roundup2(__base + (int32_t)&_end, 0x10000) - __base);
v86.ctl = V86_FLAGS;
@@ -247,7 +246,7 @@ load(void)
static Elf32_Phdr ep[2];
static Elf32_Shdr es[2];
caddr_t p;
- ino_t ino;
+ ufs_ino_t ino;
uint32_t addr, x;
int fmt, i, j;
OpenPOWER on IntegriCloud