From owner-freebsd-hackers Sat Jan 31 09:51:40 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA10667 for hackers-outgoing; Sat, 31 Jan 1998 09:51:40 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from sphinx.lovett.com (root@sphinx.lovett.com [38.155.241.2]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id JAA10659 for ; Sat, 31 Jan 1998 09:51:37 -0800 (PST) (envelope-from ade@demon.net) Received: from gorgon.lovett.com [38.155.241.3] (ade) by sphinx.lovett.com with esmtp (Exim 1.82 #1) id 0xyh4o-0003EV-00; Sat, 31 Jan 1998 11:51:34 -0600 To: "Jordan K. Hubbard" cc: hackers@FreeBSD.ORG Subject: Re: boot floppy banner Organization: Demon Internet Reply-To: ade@demon.net In-reply-to: Your message of "Sat, 31 Jan 1998 09:05:13 PST." <4780.886266313@time.cdrom.com> Date: Sat, 31 Jan 1998 11:51:34 -0600 From: Ade Lovett Message-Id: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG X-To-Unsubscribe: mail to majordomo@FreeBSD.org "unsubscribe hackers" "Jordan K. Hubbard" writes: > >Sure, gosh, I think we have at least 300 bytes left in the boot blocks >to implement a help command parser with. Bruce? Do you remember the >exact count? :-) Actually, it can be made to fit, if you don't mind losing the "Can't find " printf()'s.. Patch below, against current-980131.. initial text printed is from /boot.banner .. typing 'help' changes this to print the contents of /boot.help ---------------------------------------------------------------------- gorgon 461# cvs -d /code/FreeBSD diff boot.c RCS file: /code/FreeBSD/src/sys/i386/boot/biosboot/boot.c,v retrieving revision 1.69 diff -r1.69 boot.c 62a63 > #define BOOT_BANNER_SIZE 512 66a68 > static char boot_banner[BOOT_BANNER_SIZE]; 87a90 > char *boot_text = boot_banner; 128a132 > readfile("boot.banner", boot_banner, BOOT_BANNER_SIZE); 159c163 < boot_help); --- > boot_text); 176c180,183 < else --- > else if (!strcmp(linebuf, "help")) { > boot_text = boot_help; > goto loadstart; > } else 180,183c187 < ret = openrd(); < if (ret != 0) { < if (ret > 0) < printf("Can't find %s\n", name); --- > if (openrd() != 0) 185d188 < } 354,355d356 < int openstatus; < 358,362c359 < openstatus = openrd(); < if (openstatus != 0) { < if (openstatus > 0) < printf("Can't find file %s\n", name); < } else { --- > if (openrd() == 0) { ---------------------------------------------------------------------- -aDe -- Ade Lovett, Demon Internet, Austin, Texas.