diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2011-03-10 16:40:13 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2011-03-10 16:40:13 +0000 |
commit | f386257f6a9da229057eea15494e3cd20b4eb0c9 (patch) | |
tree | 45a6a718681a5485c22d795ec2f71d1f846f06da /sys/boot/common | |
parent | f26cdc3b9a6fd78a30cf5b1c23d3c8e4754e2ade (diff) | |
download | FreeBSD-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.c | 4 |
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++; |