From cd37fe517bf7fe520d279c59354919774ae99f89 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Sun, 14 Nov 1999 22:17:06 +0000 Subject: [PATCH] Return this file to its pre-spammed version. Thanks to some new compiler optimizations, we can go from 3 bytes free with the spammed version, to 279 bytes free with the full version. --- sys/boot/i386/boot2/boot2.c | 16 ++++++++-------- sys/boot/i386/gptboot/gptboot.c | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sys/boot/i386/boot2/boot2.c b/sys/boot/i386/boot2/boot2.c index 503c10cfcd4..eefcf086c5f 100644 --- a/sys/boot/i386/boot2/boot2.c +++ b/sys/boot/i386/boot2/boot2.c @@ -100,8 +100,8 @@ static struct dsk { int init; int meta; } dsk; -static char cmd[80]; -static char kname[128]; +static char cmd[512]; +static char kname[1024]; static uint32_t opts; static struct bootinfo bootinfo; static int ls; @@ -170,9 +170,9 @@ main(void) memcpy(kname, PATH_KERNEL, sizeof(PATH_KERNEL)); } for (;;) { - printf( /* " \n>> FreeBSD/i386 BOOT\n" */ - /* "Default: */ "%u:%s(%u,%c)%s:", - /* "boot: ", */ + printf(" \n>> FreeBSD/i386 BOOT\n" + "Default: %u:%s(%u,%c)%s\n" + "boot: ", dsk.drive & DRV_MASK, dev_nm[dsk.type], dsk.unit, 'a' + dsk.part, kname); if (ioctrl & 0x2) @@ -209,8 +209,8 @@ load(const char *fname) int fmt, i, j; if (!(ino = lookup(fname))) { - /* if (!ls) - printf("No %s\n", fname); */ + if (!ls) + printf("No %s\n", fname); return; } if (xfsread(ino, &hdr, sizeof(hdr))) @@ -310,7 +310,7 @@ parse(char *arg) } if (opts & 1 << RBX_PROBEKBD) { i = *(uint8_t *)PTOV(0x496) & 0x10; - /* printf("Keyboard: %s\n", i ? "yes" : "no"); */ + printf("Keyboard: %s\n", i ? "yes" : "no"); if (!i) opts |= 1 << RBX_DUAL | 1 << RBX_SERIAL; opts &= ~(1 << RBX_PROBEKBD); diff --git a/sys/boot/i386/gptboot/gptboot.c b/sys/boot/i386/gptboot/gptboot.c index 503c10cfcd4..eefcf086c5f 100644 --- a/sys/boot/i386/gptboot/gptboot.c +++ b/sys/boot/i386/gptboot/gptboot.c @@ -100,8 +100,8 @@ static struct dsk { int init; int meta; } dsk; -static char cmd[80]; -static char kname[128]; +static char cmd[512]; +static char kname[1024]; static uint32_t opts; static struct bootinfo bootinfo; static int ls; @@ -170,9 +170,9 @@ main(void) memcpy(kname, PATH_KERNEL, sizeof(PATH_KERNEL)); } for (;;) { - printf( /* " \n>> FreeBSD/i386 BOOT\n" */ - /* "Default: */ "%u:%s(%u,%c)%s:", - /* "boot: ", */ + printf(" \n>> FreeBSD/i386 BOOT\n" + "Default: %u:%s(%u,%c)%s\n" + "boot: ", dsk.drive & DRV_MASK, dev_nm[dsk.type], dsk.unit, 'a' + dsk.part, kname); if (ioctrl & 0x2) @@ -209,8 +209,8 @@ load(const char *fname) int fmt, i, j; if (!(ino = lookup(fname))) { - /* if (!ls) - printf("No %s\n", fname); */ + if (!ls) + printf("No %s\n", fname); return; } if (xfsread(ino, &hdr, sizeof(hdr))) @@ -310,7 +310,7 @@ parse(char *arg) } if (opts & 1 << RBX_PROBEKBD) { i = *(uint8_t *)PTOV(0x496) & 0x10; - /* printf("Keyboard: %s\n", i ? "yes" : "no"); */ + printf("Keyboard: %s\n", i ? "yes" : "no"); if (!i) opts |= 1 << RBX_DUAL | 1 << RBX_SERIAL; opts &= ~(1 << RBX_PROBEKBD);