[eros-cvs] cvs commit: eros/src/base/cross/lib/erosimg Volume.cxx Volume.hxx

shap@eros.cs.jhu.edu shap@eros.cs.jhu.edu
Mon, 29 Jan 2001 07:48:30 -0500


shap        01/01/29 07:48:30

  Modified:    src/base/cross/bin/lsvol dbvol.cxx
               src/base/cross/lib/erosimg Volume.cxx Volume.hxx
  Log:
  Patched up charlie's ifdefs from #if 0 to #ifdef DEAD_CAP_PAGE
  
  Restored the declaration of the cap page routines in Volume.hxx, suitably
  wrapped. We should either ifdef or remove. Preferably ifdef for now.

Revision  Changes    Path
1.44      +4 -4      eros/src/base/cross/bin/lsvol/dbvol.cxx

Index: dbvol.cxx
===================================================================
RCS file: /cvs/eros/src/base/cross/bin/lsvol/dbvol.cxx,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- dbvol.cxx	2001/01/29 04:08:50	1.43
+++ dbvol.cxx	2001/01/29 12:48:29	1.44
@@ -232,7 +232,7 @@
     Diag::printf("...\n");
     Diag::printf("\n");
   }
-#if 0 /* no cap pages */
+#ifdef DEAD_CAP_PAGES /* no cap pages */
   else if (Parse::MatchStart(rest, buf) &&
 	   Parse::MatchKeyword(rest, "cp") &&
 	   Parse::MatchOIDVal(rest, oid) &&
@@ -261,7 +261,7 @@
       Diag::printf("\n");
     }
   }
-#endif /* no cap pages */
+#endif /* DEAD_CAP_PAGES */
   else if (Parse::MatchStart(rest, buf) &&
 	   Parse::MatchKeyword(rest, "v") &&
 	   Parse::MatchEOL(rest) ) {
@@ -309,7 +309,7 @@
 	vol.WriteKernelImage(i, kernelImage);
     }
   }
-#if 0
+#ifdef DEAD_BAD_MAP /* bad maps are a thing of the past */
   else if (Parse::MatchKeyword(rest, "b") &&
 	   Parse::MatchEOL(rest) ) {
 
@@ -339,7 +339,7 @@
     Diag::printf("  v        - print out the volume header\n");
     Diag::printf("  d        - print out the division table\n");
     Diag::printf("  r        - print out the rsrv table\n");
-#if 0
+#ifdef DEAD_BAD_MAP
     Diag::printf("  b        - print out the bad block table\n");
 #endif
     Diag::printf("  kernel   - install new kernel on existing volume\n");



1.77      +4 -19     eros/src/base/cross/lib/erosimg/Volume.cxx

Index: Volume.cxx
===================================================================
RCS file: /cvs/eros/src/base/cross/lib/erosimg/Volume.cxx,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -r1.76 -r1.77
--- Volume.cxx	2001/01/29 04:08:50	1.76
+++ Volume.cxx	2001/01/29 12:48:29	1.77
@@ -100,7 +100,7 @@
 Volume::Volume()
 {
   InitVolume();
-#if 0
+#ifdef DEAD_BAD_MAP /* spare ranges are a thing of the past */
   divTable = (Division *) divPage;
   badmap = (BadEnt*) &divTable[NDIVENT];
 #endif
@@ -333,7 +333,7 @@
 
   needSyncHdr = 1;		/* if nothing else, volume size changed */
   
-#if 0
+#ifdef DEAD_BAD_MAP /* spare ranges are a thing of the past */
   if (type == dt_Spare)
     spareDivNdx = div;
 #endif
@@ -341,21 +341,6 @@
   divNeedsInit[div] = true;
   needDivInit = true;
 
-#if 0
-  switch (type) {
-  case dt_Swap:
-  case dt_Page:
-  case dt_Node:
-  case dt_Log:
-    divNeedsInit[div] = true;
-    needDivInit = true;
-    break;
-  default:
-    divNeedsInit[div] = false;
-    break;
-  }
-#endif
-
   needSyncDivisions = true;
   
   return div;
@@ -1482,7 +1467,7 @@
   return true;
 }
 
-#if 0 /* no cap pages */
+#ifdef DEAD_CAP_PAGE /* no cap pages */
 /* FIX: This has a bad bug, in that it checks the page pot before it
  * checks the log entry.
  */
@@ -1636,7 +1621,7 @@
 
   return true;
 }
-#endif /* no cap pages */
+#endif /* DEAD_CAP_PAGE */
 
 /* Log I/O support: */
 bool



1.49      +7 -2      eros/src/base/cross/lib/erosimg/Volume.hxx

Index: Volume.hxx
===================================================================
RCS file: /cvs/eros/src/base/cross/lib/erosimg/Volume.hxx,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- Volume.hxx	2001/01/29 04:08:50	1.48
+++ Volume.hxx	2001/01/29 12:48:29	1.49
@@ -188,7 +188,7 @@
 
   int MaxDiv()
   { return topDiv; }
-#if 0
+#ifdef DEAD_BAD_MAP
   int MaxBadEnt()
   { return topBadEnt; }
 #endif
@@ -198,7 +198,7 @@
   const VolHdr& GetVolHdr()
     { return volHdr; }
 
-#if 0
+#ifdef DEAD_BAD_MAP
   const BadEnt& GetBadEnt(int i)
     { return badmap[i]; }
 #endif
@@ -210,6 +210,11 @@
   bool ReadDataPage(const OID& oid, uint8_t* buf);
   bool WriteDataPage(const OID& oid, const uint8_t* buf);
 
+#ifdef DEAD_CAP_PAGE
+  bool ReadDataPage(const OID& oid, uint8_t* buf);
+  bool WriteDataPage(const OID& oid, const uint8_t* buf);
+#endif
+  
   bool ReadNode(const OID& oid, DiskNode& node);
   bool WriteNode(const OID& oid, const DiskNode& node);