delete unneeded header files
[unix-history] / usr / src / sys / vax / stand / boot.c
index af061e3..6daced5 100644 (file)
@@ -3,12 +3,10 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)boot.c      7.8 (Berkeley) %G%
+ *     @(#)boot.c      7.13 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
-#include "inode.h"
-#include "fs.h"
 #include "vm.h"
 #include "reboot.h"
 
 #include "vm.h"
 #include "reboot.h"
 
  * boot comes from.
  */
 
  * boot comes from.
  */
 
-#define        UNIX    "/vmunix"
 char line[100];
 
 char line[100];
 
-int    retry = 0;
 extern unsigned opendev;
 
 main()
 {
        register unsigned howto, devtype;       /* howto=r11, devtype=r10 */
 extern unsigned opendev;
 
 main()
 {
        register unsigned howto, devtype;       /* howto=r11, devtype=r10 */
-       int io, type;
+       int io = 0, retry, type;
 
 #ifdef lint
        howto = 0; devtype = 0;
 #endif
 
 #ifdef lint
        howto = 0; devtype = 0;
 #endif
-       printf("\nBoot\n");
 #ifdef JUSTASK
        howto = RB_ASKNAME|RB_SINGLE;
 #else
 #ifdef JUSTASK
        howto = RB_ASKNAME|RB_SINGLE;
 #else
@@ -47,7 +42,9 @@ main()
                        howto |= RB_SINGLE|RB_ASKNAME;
        }
 #endif
                        howto |= RB_SINGLE|RB_ASKNAME;
        }
 #endif
-       for (;;) {
+       for (retry = 0;;) {
+               if (io >= 0)
+                       printf("\nBoot\n");
                if (howto & RB_ASKNAME) {
                        printf(": ");
                        gets(line);
                if (howto & RB_ASKNAME) {
                        printf(": ");
                        gets(line);
@@ -81,9 +78,7 @@ copyunix(howto, devtype, aio)
        register int io = aio, i;
        char *addr;
 
        register int io = aio, i;
        char *addr;
 
-       i = read(io, (char *)&x, sizeof(x));
-       if (i != sizeof(x) || (x.a_magic != OMAGIC && x.a_magic != ZMAGIC
-           && x.a_magic != NMAGIC)) {
+       if (read(io, (char *)&x, sizeof(x)) != sizeof(x) || N_BADMAG(x)) {
                printf("Bad format\n");
                return;
        }
                printf("Bad format\n");
                return;
        }