From c4adc942a0bec34fc4bb239dac3575a45ee54ef7 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Tue, 25 Nov 2014 15:55:37 +0000 Subject: [PATCH] kdata,start: undo the bufpool hack The strings should now end up in _DISCARD without hackery --- Kernel/kdata.c | 12 +----------- Kernel/start.c | 14 ++++++++++---- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/Kernel/kdata.c b/Kernel/kdata.c index 39d92dac..1fb12811 100644 --- a/Kernel/kdata.c +++ b/Kernel/kdata.c @@ -24,17 +24,7 @@ struct runload loadavg[3] = { { 254, 0 } /* 180 sets of 5 seconds per 15 minutes */ }; -/* We keep the boot up strings in the buffer pool then toss them! 8) */ - -struct blkbuf bufpool[NBUFS] = { - {"FUZIX version %s\n" - "Copyright (c) 1988-2002 by H.F.Bower, D.Braun, S.Nitschke, H.Peraza\n" - "Copyright (C) 1997-2001 by Arcady Schekochikhin, Adriano C. R. da Cunha\n" - "Copyright (c) 2013 Will Sowerbutts \n" - "Copyright (c) 2014 Alan Cox \nDevboot\n",}, - {"WARNING: Increase PTABSIZE to %d to use available RAM\n",}, - {"%dkB total RAM, %dkB available to processes (%d processes max)\n",}, -}; +struct blkbuf bufpool[NBUFS]; struct p_tab ptab[PTABSIZE]; struct oft of_tab[OFTSIZE]; /* Open File Table */ diff --git a/Kernel/start.c b/Kernel/start.c index abb490d1..f82c7620 100644 --- a/Kernel/start.c +++ b/Kernel/start.c @@ -86,14 +86,21 @@ void fuzix_main(void) panic("no tty"); /* Sign on messages (stashed in a buffer so we can bin them */ - kprintf((char *)bufpool[0].bf_data, uname_str); + kprintf( + "FUZIX version %s\n" + "Copyright (c) 1988-2002 by H.F.Bower, D.Braun, S.Nitschke, H.Peraza\n" + "Copyright (C) 1997-2001 by Arcady Schekochikhin, Adriano C. R. da Cunha\n" + "Copyright (c) 2013 Will Sowerbutts \n" + "Copyright (c) 2014 Alan Cox \nDevboot\n", + uname_str); #ifndef SWAPDEV #ifdef PROC_SIZE maxproc = procmem / PROC_SIZE; /* Check we don't exceed the process table size limit */ if (maxproc > PTABSIZE) { - kprintf((char *)bufpool[1].bf_data, maxproc); + kprintf("WARNING: Increase PTABSIZE to %d to use available RAM\n", + maxproc); maxproc = PTABSIZE; } #else @@ -103,8 +110,7 @@ void fuzix_main(void) maxproc = PTABSIZE; #endif /* Parameters message */ - kprintf((char *)bufpool[2].bf_data, ramsize, procmem, maxproc); - /* Now blow away the strings */ + kprintf("%dkB total RAM, %dkB available to processes (%d processes max)\n", ramsize, procmem, maxproc); bufinit(); pagemap_init(); -- 2.34.1