From: David Devecsery Date: Sun, 23 Aug 2020 22:36:31 +0000 (-0400) Subject: Reduced lab1 bootblock code size (hopefully) X-Git-Url: https://git.devinivas.org/?a=commitdiff_plain;h=fa4542f40bb38eab32b4f5a6e112d3726f4443fd;p=cs3210-lab1.git Reduced lab1 bootblock code size (hopefully) --- diff --git a/bootblock/bootmain.c b/bootblock/bootmain.c index 737fb15..d3c2bde 100644 --- a/bootblock/bootmain.c +++ b/bootblock/bootmain.c @@ -12,7 +12,7 @@ #define SECTSIZE 512 -void readseg(uchar*, uint, uint); +static void readseg(uchar*, uint, uint); void bootmain(void) @@ -47,7 +47,7 @@ bootmain(void) entry(); } -void +static void waitdisk(void) { // Wait for disk ready. @@ -56,7 +56,7 @@ waitdisk(void) } // Read a single sector at offset into dst. -void +static void readsect(void *dst, uint offset) { // Issue command. @@ -75,7 +75,7 @@ readsect(void *dst, uint offset) // Read 'count' bytes at 'offset' from kernel into physical address 'pa'. // Might copy more than asked. -void +static void readseg(uchar* pa, uint count, uint offset) { uchar* epa; @@ -94,3 +94,4 @@ readseg(uchar* pa, uint count, uint offset) for(; pa < epa; pa += SECTSIZE, offset++) readsect(pa, offset); } +