From fa4542f40bb38eab32b4f5a6e112d3726f4443fd Mon Sep 17 00:00:00 2001 From: David Devecsery Date: Sun, 23 Aug 2020 18:36:31 -0400 Subject: [PATCH] Reduced lab1 bootblock code size (hopefully) --- bootblock/bootmain.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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); } + -- 2.47.3