[eros-cvs] cvs commit: eros/src/doc/www/devel/CrossGuide mkimage-ref.html

shap@eros.cs.jhu.edu shap@eros.cs.jhu.edu
Mon, 29 Jan 2001 08:04:52 -0500


shap        01/01/29 08:04:51

  Modified:    src/base/cross/bin/mkimage gram.y lex.l
               src/doc/www/devel/CrossGuide mkimage-ref.html
  Log:
  Add "void" keyword into the mkimage utility. Place a deprecating message
  on uses of null. At some point we need to turn that message into an error
  briefly so that we can find all the uses.

Revision  Changes    Path
1.52      +8 -0      eros/src/base/cross/bin/mkimage/gram.y

Index: gram.y
===================================================================
RCS file: /cvs/eros/src/base/cross/bin/mkimage/gram.y,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- gram.y	2001/01/23 21:08:57	1.51
+++ gram.y	2001/01/29 13:04:51	1.52
@@ -186,6 +186,7 @@
 %token <NONE> PC SP ALL SLOTS KEYS STRING LIMIT RUN AS
 %token <NONE> RANGE NUMBER SCHED MISC VOLSIZE DIRECTORY PRIME
 %token <NONE> SYMBOL CAPABILITY
+%token <NONE> VOIDKEY
 %token <is> NAME FILENAME HEX OCT BIN DEC WORD
 
 %type <key> key segkey domain startkey
@@ -539,7 +540,14 @@
 
 key:   NULLKEY {
 	  SHOWPARSE("=== key -> NULLKEY\n");
+	  Diag::printf("%s:%d: null key should often be replaced by "
+		       "void key! \"%s\"\n",
+		       current_file.str(), current_line);
 	  $$ = NumberKey(0);
+	}
+       | VOIDKEY {
+	  SHOWPARSE("=== key -> VOIDKEY\n");
+	  $$ = MiscKey(MiscKeyType::Void);
 	}
 
        | VOLSIZE {



1.23      +1 -0      eros/src/base/cross/bin/mkimage/lex.l

Index: lex.l
===================================================================
RCS file: /cvs/eros/src/base/cross/bin/mkimage/lex.l,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- lex.l	2000/11/19 18:05:46	1.22
+++ lex.l	2001/01/29 13:04:51	1.23
@@ -77,6 +77,7 @@
 program	{ return PROGRAM; }
 small	{ return SMALL; }
 null	{ return NULLKEY; }
+void	{ return VOIDKEY; }
 zero	{ return ZERO; }
 empty	{ return EMPTY; }
 with	{ return WITH; }



1.25      +11 -1     eros/src/doc/www/devel/CrossGuide/mkimage-ref.html

Index: mkimage-ref.html
===================================================================
RCS file: /cvs/eros/src/doc/www/devel/CrossGuide/mkimage-ref.html,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- mkimage-ref.html	2001/01/20 20:30:15	1.24
+++ mkimage-ref.html	2001/01/29 13:04:51	1.25
@@ -529,7 +529,9 @@
 	</dt>
 	<dd>
 	     <p>
-	     The null key (the zero number key).
+	     The null key (the zero number key). If you are using this
+	     to convey no authority, you should switch to the void key
+	     (below).
 	     </p>
 	</dd>
 	<dt>
@@ -607,6 +609,14 @@
 	     counter.  While the most commonly used <i>name</i> is
 	     <tt>_start</tt>, other names can be used to provide
 	     multiple entry points into a single binary file.
+	     </p>
+	</dd>
+	<dt>
+	     <b>void</b>
+	</dt>
+	<dd>
+	     <p>
+	     The void key (a key conveying no authority).
 	     </p>
 	</dd>
 	<dt>