summaryrefslogtreecommitdiffstats
path: root/sys/boot/common
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2011-03-10 16:40:13 +0000
committerrdivacky <rdivacky@FreeBSD.org>2011-03-10 16:40:13 +0000
commitf386257f6a9da229057eea15494e3cd20b4eb0c9 (patch)
tree45a6a718681a5485c22d795ec2f71d1f846f06da /sys/boot/common
parentf26cdc3b9a6fd78a30cf5b1c23d3c8e4754e2ade (diff)
downloadFreeBSD-src-f386257f6a9da229057eea15494e3cd20b4eb0c9.zip
FreeBSD-src-f386257f6a9da229057eea15494e3cd20b4eb0c9.tar.gz
Some more shrinking.
o bunch of variables are turned into uint8_t o initial setting of namep[] in lookup() is removed as it's only overwritten a few lines down o kname is explicitly initialized in main() as BSS in boot2 is not zeroed o the setting and reading of "fmt" in load() is removed o buf in printf() is made static to save space Reviewed by: jhb Tested by: me and Fabian Keil <freebsd-listen fabiankeil de>
Diffstat (limited to 'sys/boot/common')
-rw-r--r--sys/boot/common/ufsread.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/boot/common/ufsread.c b/sys/boot/common/ufsread.c
index 06539fe..2724d7c 100644
--- a/sys/boot/common/ufsread.c
+++ b/sys/boot/common/ufsread.c
@@ -87,7 +87,7 @@ static struct dmadat *dmadat;
static ino_t lookup(const char *);
static ssize_t fsread(ino_t, void *, size_t);
-static int ls, dsk_meta;
+static uint8_t ls, dsk_meta;
static uint32_t fs_off;
static __inline int
@@ -126,8 +126,6 @@ lookup(const char *path)
ino = ROOTINO;
dt = DT_DIR;
- name[0] = '/';
- name[1] = '\0';
for (;;) {
if (*path == '/')
path++;
OpenPOWER on IntegriCloud