]> Devi Nivas Git - cs3210-lab1.git/commitdiff
Reduced lab1 bootblock code size (hopefully)
authorDavid Devecsery <ddevec@gatech.edu>
Sun, 23 Aug 2020 22:36:31 +0000 (18:36 -0400)
committerDavid Devecsery <ddevec@gatech.edu>
Sun, 23 Aug 2020 22:36:31 +0000 (18:36 -0400)
bootblock/bootmain.c

index 737fb1588c8a9da4978bedb3b3a60de4a11d23e0..d3c2bdea7249acbb54df8f13ccf46bd26aeac059 100644 (file)
@@ -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);
 }
+