Subversion Repositories SvarDOS

Rev

Rev 277 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 277 Rev 280
Line 119... Line 119...
119
  s = kittengets(nlsmaj, nlsmin, s);
119
  s = kittengets(nlsmaj, nlsmin, s);
120
  return(putstringwrap(y, x, attr, s));
120
  return(putstringwrap(y, x, attr, s));
121
}
121
}
122
 
122
 
123
 
123
 
-
 
124
/* copy file f1 to f2 using buff as a buffer of buffsz bytes. f2 will be overwritten if it
-
 
125
 * exists already! returns 0 on success. */
-
 
126
static int fcopy(const char *f2, const char *f1, void *buff, size_t buffsz) {
-
 
127
  FILE *fd1, *fd2;
-
 
128
  size_t sz;
-
 
129
  int res = -1; /* assume failure */
-
 
130
 
-
 
131
  /* open files */
-
 
132
  fd1 = fopen(f1, "rb");
-
 
133
  fd2 = fopen(f2, "wb");
-
 
134
  if ((fd1 == NULL) || (fd2 == NULL)) goto QUIT;
-
 
135
 
-
 
136
  /* copy data */
-
 
137
  for (;;) {
-
 
138
    sz = fread(buff, 1, buffsz, fd1);
-
 
139
    if (sz == 0) {
-
 
140
      if (feof(fd1) != 0) break;
-
 
141
      goto QUIT;
-
 
142
    }
-
 
143
    if (fwrite(buff, 1, sz, fd2) != sz) goto QUIT;
-
 
144
  }
-
 
145
 
-
 
146
  res = 0; /* success */
-
 
147
 
-
 
148
  QUIT:
-
 
149
  if (fd1 != NULL) fclose(fd1);
-
 
150
  if (fd2 != NULL) fclose(fd2);
-
 
151
  return(res);
-
 
152
}
-
 
153
 
-
 
154
 
124
static int menuselect(int ypos, int xpos, int height, char **list, int listlen) {
155
static int menuselect(int ypos, int xpos, int height, char **list, int listlen) {
125
  int i, offset = 0, res = 0, count, width = 0;
156
  int i, offset = 0, res = 0, count, width = 0;
126
  /* count how many positions there is, and check their width */
157
  /* count how many positions there is, and check their width */
127
  for (count = 0; (list[count] != NULL) && (count != listlen); count++) {
158
  for (count = 0; (list[count] != NULL) && (count != listlen); count++) {
128
    int len = strlen(list[count]);
159
    int len = strlen(list[count]);
Line 382... Line 413...
382
  }
413
  }
383
  /* _dos_findclose(&fileinfo); */ /* apparently required only on OS/2 */
414
  /* _dos_findclose(&fileinfo); */ /* apparently required only on OS/2 */
384
  return(res);
415
  return(res);
385
}
416
}
386
 
417
 
387
 
418
#ifdef DEADCODE
388
/* set new DOS "current drive" to drv ('A', 'B', etc). returns 0 on success */
419
/* set new DOS "current drive" to drv ('A', 'B', etc). returns 0 on success */
389
static int set_cur_drive(char drv) {
420
static int set_cur_drive(char drv) {
390
  union REGS r;
421
  union REGS r;
391
  if ((drv < 'A') || (drv > 'Z')) return(-1);
422
  if ((drv < 'A') || (drv > 'Z')) return(-1);
392
  r.h.ah = 0x0E; /* DOS 1+ SELECT DEFAULT DRIVE */
423
  r.h.ah = 0x0E; /* DOS 1+ SELECT DEFAULT DRIVE */
393
  r.h.dl = drv - 'A';
424
  r.h.dl = drv - 'A';
394
  int86(0x21, &r, &r);
425
  int86(0x21, &r, &r);
395
  if (r.h.al < drv - 'A') return(-1);
426
  if (r.h.al < drv - 'A') return(-1);
396
  return(0);
427
  return(0);
397
}
428
}
398
 
429
#endif
399
 
430
 
400
/* returns 0 if file exists, non-zero otherwise */
431
/* returns 0 if file exists, non-zero otherwise */
401
static int fileexists(const char *fname) {
432
static int fileexists(const char *fname) {
402
  FILE *fd;
433
  FILE *fd;
403
  fd = fopen(fname, "rb");
434
  fd = fopen(fname, "rb");
Line 522... Line 553...
522
    }
553
    }
523
  }
554
  }
524
}
555
}
525
 
556
 
526
 
557
 
-
 
558
/* generates locales-related configurations and writes them to file (this
-
 
559
 * is used to compute autoexec.bat content) */
-
 
560
static void genlocalesconf(FILE *fd, const struct slocales *locales) {
-
 
561
  if (locales == NULL) return;
-
 
562
 
-
 
563
  fprintf(fd, "SET LANG=%s\r\n", locales->lang);
-
 
564
 
-
 
565
  if (locales->egafile > 0) {
-
 
566
    fprintf(fd, "DISPLAY CON=(EGA,,1)\r\n");
-
 
567
    if (locales->egafile == 1) {
-
 
568
      fprintf(fd, "MODE CON CP PREPARE=((%u) %%DOSDIR%%\\CPI\\EGA.CPX)\r\n", locales->codepage);
-
 
569
    } else {
-
 
570
      fprintf(fd, "MODE CON CP PREPARE=((%u) %%DOSDIR%%\\CPI\\EGA%d.CPX)\r\n", locales->codepage, locales->egafile);
-
 
571
    }
-
 
572
    fprintf(fd, "MODE CON CP SELECT=%u\r\n", locales->codepage);
-
 
573
  }
-
 
574
 
-
 
575
  if (locales->keybfile > 0) {
-
 
576
    fprintf(fd, "KEYB %s,%d,%%DOSDIR%%\\BIN\\", locales->keybcode, locales->codepage);
-
 
577
    if (locales->keybfile == 1) {
-
 
578
      fprintf(fd, "KEYBOARD.SYS");
-
 
579
    } else {
-
 
580
      fprintf(fd, "KEYBRD%d.SYS", locales->keybfile);
-
 
581
    }
-
 
582
    if (locales->keybid != 0) fprintf(fd, " /ID:%d", locales->keybid);
-
 
583
    fprintf(fd, "\r\n");
-
 
584
  }
-
 
585
}
-
 
586
 
-
 
587
 
527
static void bootfilesgen(char targetdrv, const struct slocales *locales, char cdromdrv) {
588
static void bootfilesgen(char targetdrv, const struct slocales *locales) {
528
  char buff[128];
589
  char buff[128];
529
  char buff2[16];
-
 
530
  char buff3[16];
-
 
531
  FILE *fd;
590
  FILE *fd;
532
  /*** CONFIG.SYS ***/
591
  /*** CONFIG.SYS ***/
533
  snprintf(buff, sizeof(buff), "%c:\\CONFIG.SYS", targetdrv);
592
  snprintf(buff, sizeof(buff), "%c:\\TEMP\\CONFIG.SYS", targetdrv);
534
  fd = fopen(buff, "wb");
593
  fd = fopen(buff, "wb");
535
  if (fd == NULL) return;
594
  if (fd == NULL) return;
536
  fprintf(fd, "DOS=UMB,HIGH\r\n"
595
  fprintf(fd, "DOS=UMB,HIGH\r\n"
537
              "LASTDRIVE=Z\r\n"
596
              "LASTDRIVE=Z\r\n"
538
              "FILES=50\r\n");
597
              "FILES=50\r\n");
Line 540... Line 599...
540
  if (strcmp(locales->lang, "EN") == 0) {
599
  if (strcmp(locales->lang, "EN") == 0) {
541
    strcpy(buff, "COMMAND");
600
    strcpy(buff, "COMMAND");
542
  } else {
601
  } else {
543
    snprintf(buff, sizeof(buff), "CMD-%s", locales->lang);
602
    snprintf(buff, sizeof(buff), "CMD-%s", locales->lang);
544
  }
603
  }
545
  fprintf(fd, "SHELLHIGH=%c:\\SVARDOS\\BIN\\%s.COM /E:512 /P\r\n", targetdrv, buff);
604
  fprintf(fd, "SHELLHIGH=C:\\SVARDOS\\BIN\\%s.COM /E:512 /P\r\n", buff);
546
  fprintf(fd, "REM COUNTRY=001,437,%c:\\SVARDOS\\CONF\\COUNTRY.SYS\r\n", targetdrv);
605
  fprintf(fd, "REM COUNTRY=001,437,C:\\SVARDOS\\CONF\\COUNTRY.SYS\r\n");
547
  fprintf(fd, "DEVICE=%c:\\DRIVERS\\UDVD2\\UDVD2.SYS /D:SVCD0001 /H\r\n", targetdrv);
606
  fprintf(fd, "REM DEVICE=C:\\DRIVERS\\UDVD2\\UDVD2.SYS /D:SVCD0001 /H\r\n");
548
  fclose(fd);
607
  fclose(fd);
549
  /*** AUTOEXEC.BAT ***/
608
  /*** AUTOEXEC.BAT ***/
550
  snprintf(buff, sizeof(buff), "%c:\\AUTOEXEC.BAT", targetdrv);
609
  snprintf(buff, sizeof(buff), "%c:\\TEMP\\AUTOEXEC.BAT", targetdrv);
551
  fd = fopen(buff, "wb");
610
  fd = fopen(buff, "wb");
552
  if (fd == NULL) return;
611
  if (fd == NULL) return;
553
  fprintf(fd, "@ECHO OFF\r\n");
612
  fprintf(fd, "@ECHO OFF\r\n");
554
  fprintf(fd, "SET TEMP=%c:\\TEMP\r\n", targetdrv);
613
  fprintf(fd, "SET TEMP=C:\\TEMP\r\n");
555
  fprintf(fd, "SET DOSDIR=%c:\\SVARDOS\r\n", targetdrv);
614
  fprintf(fd, "SET DOSDIR=C:\\SVARDOS\r\n");
556
  fprintf(fd, "SET NLSPATH=%%DOSDIR%%\\NLS\r\n");
615
  fprintf(fd, "SET NLSPATH=%%DOSDIR%%\\NLS\r\n");
557
  fprintf(fd, "SET LANG=%s\r\n", locales->lang);
-
 
558
  fprintf(fd, "SET DIRCMD=/OGNE/P/4\r\n");
616
  fprintf(fd, "SET DIRCMD=/OGNE/P/4\r\n");
559
  fprintf(fd, "SET WATTCP.CFG=%c:\\SVARDOS\\CFG\\WATTCP.CFG\r\n", targetdrv);
617
  fprintf(fd, "SET WATTCP.CFG=%%DOSDIR%%\\CFG\\WATTCP.CFG\r\n");
560
  fprintf(fd, "PATH %%DOSDIR%%\\BIN\r\n", targetdrv);
618
  fprintf(fd, "PATH %%DOSDIR%%\\BIN\r\n");
561
  fprintf(fd, "PROMPT $P$G\r\n");
619
  fprintf(fd, "PROMPT $P$G\r\n");
562
  fprintf(fd, "ALIAS REBOOT=FDAPM COLDBOOT\r\n");
620
  fprintf(fd, "ALIAS REBOOT=FDAPM COLDBOOT\r\n");
563
  fprintf(fd, "ALIAS HALT=FDAPM POWEROFF\r\n");
621
  fprintf(fd, "ALIAS HALT=FDAPM POWEROFF\r\n");
564
  fprintf(fd, "FDAPM APMDOS\r\n");
622
  fprintf(fd, "FDAPM APMDOS\r\n");
565
  fprintf(fd, "\r\n");
623
  fprintf(fd, "\r\n");
566
  if (locales->egafile > 0) {
624
  genlocalesconf(fd, locales);
567
    fprintf(fd, "DISPLAY CON=(EGA,,1)\r\n");
625
  fprintf(fd, "\r\n");
568
    if (locales->egafile == 1) {
-
 
569
      fprintf(fd, "MODE CON CP PREPARE=((%u) %c:\\SVARDOS\\CPI\\EGA.CPX)\r\n", locales->codepage, targetdrv);
-
 
570
    } else {
-
 
571
      fprintf(fd, "MODE CON CP PREPARE=((%u) %c:\\SVARDOS\\CPI\\EGA%d.CPX)\r\n", locales->codepage, targetdrv, locales->egafile);
-
 
572
    }
-
 
573
    fprintf(fd, "MODE CON CP SELECT=%u\r\n", locales->codepage);
626
  fprintf(fd, "REM Uncomment the line below for CDROM support\r\n");
574
  }
-
 
575
  if (locales->keybfile > 0) {
-
 
576
    if (locales->keybfile == 1) {
-
 
577
      snprintf(buff2, sizeof(buff2), "KEYBOARD.SYS");
-
 
578
    } else {
-
 
579
      snprintf(buff2, sizeof(buff2), "KEYBRD%d.SYS", locales->keybfile);
-
 
580
    }
-
 
581
    if (locales->keybid == 0) {
-
 
582
      buff3[0] = 0;
-
 
583
    } else {
-
 
584
      snprintf(buff3, sizeof(buff3), " /ID:%d", locales->keybid);
-
 
585
    }
-
 
586
    fprintf(fd, "KEYB %s,%d,%c:\\SVARDOS\\BIN\\%s%s\r\n", locales->keybcode, locales->codepage, targetdrv, buff2, buff3);
-
 
587
    fprintf(fd, "\r\n");
-
 
588
  }
-
 
589
  fprintf(fd, "SHSUCDX /d:SVCD0001\r\n");
627
  fprintf(fd, "REM SHSUCDX /d:SVCD0001\r\n");
590
  fprintf(fd, "\r\n");
628
  fprintf(fd, "\r\n");
591
  fprintf(fd, "REM Uncomment the line below for automatic mouse support\r\n");
629
  fprintf(fd, "REM Uncomment the line below for automatic mouse support\r\n");
592
  fprintf(fd, "REM CTMOUSE\r\n");
630
  fprintf(fd, "REM CTMOUSE\r\n");
593
  fprintf(fd, "\r\n");
631
  fprintf(fd, "\r\n");
594
  fprintf(fd, "ECHO.\r\n");
632
  fprintf(fd, "ECHO.\r\n");
Line 621... Line 659...
621
  /*** PICOTCP ***/
659
  /*** PICOTCP ***/
622
  /*** WATTCP ***/
660
  /*** WATTCP ***/
623
}
661
}
624
 
662
 
625
 
663
 
626
static int installpackages(char targetdrv, char cdromdrv) {
664
static int installpackages(char targetdrv, char srcdrv, const struct slocales *locales) {
627
  char pkglist[512];
665
  char pkglist[512];
628
  int i, pkglistlen;
666
  int i, pkglistlen;
629
  size_t pkglistflen;
667
  size_t pkglistflen;
630
  char buff[64];
668
  char buff[1024]; /* must be *at least* 1 sector big for efficient file copying */
631
  FILE *fd;
669
  FILE *fd = NULL;
632
  char *pkgptr;
670
  char *pkgptr;
633
  newscreen(3);
671
  newscreen(3);
634
  /* load pkg list */
672
  /* load pkg list */
635
  fd = fopen("install.lst", "rb");
673
  fd = fopen("install.lst", "rb");
636
  if (fd == NULL) {
674
  if (fd == NULL) {
Line 656... Line 694...
656
      case '\r':
694
      case '\r':
657
        pkglist[i] = 0;
695
        pkglist[i] = 0;
658
        break;
696
        break;
659
    }
697
    }
660
  }
698
  }
661
  /* set DOSDIR and COMSPEC */
699
  /* copy pkg.exe to the new drive, along with all packages */
662
  snprintf(buff, sizeof(buff), "%c:\\SVARDOS", targetdrv);
700
  snprintf(buff, sizeof(buff), "%c:\\TEMP\\pkg.exe", targetdrv);
663
  setenv("DOSDIR", buff, 1);
-
 
664
  snprintf(buff, sizeof(buff), "%c:\\COMMAND.COM", targetdrv);
701
  snprintf(buff + 64, sizeof(buff) - 64, "%c:\\pkg.exe", srcdrv);
665
  setenv("COMSPEC", buff, 1);
702
  fcopy(buff, buff + 64, buff, sizeof(buff));
-
 
703
 
666
  /* copy pkginst to the new drive so it is not read from the floppy each time */
704
  /* open the post-install autoexec.bat and prepare initial instructions */
667
  snprintf(buff, sizeof(buff), "COPY A:\\PKG.EXE %c:\\ > NUL", targetdrv);
705
  snprintf(buff, sizeof(buff), "%c:\\temp\\postinst.bat", targetdrv);
668
  system(buff);
706
  fd = fopen(buff, "wb");
669
  /* change current drive to target so I use the on-hdd fdinst from now on */
-
 
670
  if (set_cur_drive(targetdrv) != 0) {
707
  if (fd == NULL) return(-1);
671
    video_putstring(10, 30, COLOR_BODY[mono], "ERROR: CHANGING DRIVE TO TARGET FAILED", -1);
-
 
672
    input_getkey();
708
  fprintf(fd, "@ECHO OFF\r\n");
673
    return(-1);
-
 
674
  }
709
 
675
  /* install packages */
710
  /* copy packages */
676
  pkgptr = pkglist;
711
  pkgptr = pkglist;
677
  for (i = 0;; i++) {
712
  for (i = 0;; i++) {
678
    char buff[64];
-
 
679
    /* move forward to nearest entry or end of list */
713
    /* move forward to nearest entry or end of list */
680
    while (*pkgptr == 0) pkgptr++;
714
    while (*pkgptr == 0) pkgptr++;
681
    if (*pkgptr == 0xff) break;
715
    if (*pkgptr == 0xff) break;
682
    /* install the package */
716
    /* install the package */
683
    snprintf(buff, sizeof(buff), kittengets(4, 0, "Installing package %d/%d: %s"), i+1, pkglistlen, pkgptr);
717
    snprintf(buff, sizeof(buff), kittengets(4, 0, "Installing package %d/%d: %s"), i+1, pkglistlen, pkgptr);
684
    strcat(buff, "       ");
718
    strcat(buff, "       ");
685
    video_putstringfix(10, 1, COLOR_BODY[mono], buff, sizeof(buff));
719
    video_putstringfix(10, 1, COLOR_BODY[mono], buff, sizeof(buff));
686
    /* wait for new diskette if package not found */
720
    /* wait for new diskette if package not found */
687
    snprintf(buff, sizeof(buff), "%c:\\%s.zip", cdromdrv, pkgptr);
721
    snprintf(buff, sizeof(buff), "%c:\\%s.zip", srcdrv, pkgptr);
688
    while (fileexists(buff) != 0) {
722
    while (fileexists(buff) != 0) {
689
      putstringnls(12, 1, COLOR_BODY[mono], 4, 1, "*** INSERT THE DISK THAT CONTAINS THE REQUIRED FILE AND PRESS ANY KEY ***");
723
      putstringnls(12, 1, COLOR_BODY[mono], 4, 1, "*** INSERT THE DISK THAT CONTAINS THE REQUIRED FILE AND PRESS ANY KEY ***");
690
      input_getkey();
724
      input_getkey();
691
      video_putstringfix(12, 1, COLOR_BODY[mono], "", 80); /* erase the 'insert disk' message */
725
      video_putstringfix(12, 1, COLOR_BODY[mono], "", 80); /* erase the 'insert disk' message */
692
    }
726
    }
693
    /* proceed with package install */
727
    /* proceed with package copy (buff contains the src filename already) */
694
    snprintf(buff, sizeof(buff), "PKG INSTALL %c:\\%s.ZIP > NUL", cdromdrv, pkgptr);
728
    snprintf(buff + 32, sizeof(buff) - 32, "%c:\\temp\\%s.zip", targetdrv, pkgptr);
695
    if (system(buff) != 0) {
729
    if (fcopy(buff + 32, buff, buff, sizeof(buff)) != 0) {
696
      video_putstring(12, 30, COLOR_BODY[mono], "ERROR: PKG INSTALL FAILED", -1);
730
      video_putstring(10, 30, COLOR_BODY[mono], "READ ERROR", -1);
697
      input_getkey();
731
      input_getkey();
-
 
732
      fclose(fd);
698
      return(-1);
733
      return(-1);
699
    }
734
    }
-
 
735
    /* write install instruction to post-install script */
-
 
736
    fprintf(fd, "pkg install %s.zip\r\ndel %s.zip\r\n", pkgptr, pkgptr);
700
    /* jump to next entry or end of list */
737
    /* jump to next entry or end of list */
701
    while ((*pkgptr != 0) && (*pkgptr != 0xff)) pkgptr++;
738
    while ((*pkgptr != 0) && (*pkgptr != 0xff)) pkgptr++;
702
    if (*pkgptr == 0xff) break;
739
    if (*pkgptr == 0xff) break;
703
  }
740
  }
-
 
741
  /* set up locales so the "installation over" message is nicely displayed */
-
 
742
  genlocalesconf(fd, locales);
-
 
743
  /* replace autoexec.bat and config.sys now and write some nice message on screen */
-
 
744
  fprintf(fd, "DEL pkg.exe\r\n"
-
 
745
              "COPY CONFIG.SYS C:\\\r\n"
-
 
746
              "DEL CONFIG.SYS\r\n"
-
 
747
              "DEL C:\\AUTOEXEC.BAT\r\n"
-
 
748
              "COPY AUTOEXEC.BAT C:\\\r\n"
-
 
749
              "DEL AUTOEXEC.BAT\r\n");
-
 
750
  /* print out the "installation over" message */
-
 
751
  fprintf(fd, "ECHO.\r\n"
-
 
752
              "ECHO %s\r\n"
-
 
753
              "ECHO.\r\n", kittengets(5, 1, "SvarDOS installation is over. Please restart your computer now."));
-
 
754
  fclose(fd);
-
 
755
 
-
 
756
  /* prepare a dummy autoexec.bat that will call temp\postinst.bat */
-
 
757
  snprintf(buff, sizeof(buff), "%c:\\autoexec.bat", targetdrv);
-
 
758
  fd = fopen(buff, "wb");
-
 
759
  if (fd == NULL) return(-1);
-
 
760
  fprintf(fd, "@ECHO OFF\r\n"
-
 
761
              "SET DOSDIR=C:\\SVARDOS\r\n"
-
 
762
              "SET NLSPATH=%%DOSDIR%%\\NLS\r\n"
-
 
763
              "PATH %%DOSDIR%%\\BIN\r\n");
-
 
764
  fprintf(fd, "CD TEMP\r\n"
-
 
765
              "postinst.bat\r\n");
-
 
766
  fclose(fd);
-
 
767
 
704
  return(0);
768
  return(0);
705
}
769
}
706
 
770
 
707
 
771
 
708
static void finalreboot(void) {
772
static void finalreboot(void) {
709
  int y = 9;
773
  int y = 9;
710
  newscreen(2);
774
  newscreen(2);
711
  y += putstringnls(y, 1, COLOR_BODY[mono], 5, 0, "SvarDOS installation is over. Your computer will reboot now.\nPlease remove the installation disk from your drive.");
775
  y += putstringnls(y, 1, COLOR_BODY[mono], 5, 0, "Your computer will reboot now.\nPlease remove the installation disk from your drive.");
712
  putstringnls(++y, 1, COLOR_BODY[mono], 0, 5, "Press any key...");
776
  putstringnls(++y, 1, COLOR_BODY[mono], 0, 5, "Press any key...");
713
  input_getkey();
777
  input_getkey();
714
  reboot();
778
  reboot();
715
}
779
}
716
 
780
 
Line 793... Line 857...
793
  if (action == MENUQUIT) goto Quit;
857
  if (action == MENUQUIT) goto Quit;
794
  if (action == MENUPREV) goto SelectLang;
858
  if (action == MENUPREV) goto SelectLang;
795
  targetdrv = preparedrive(); /* what drive should we install to? check avail. space */
859
  targetdrv = preparedrive(); /* what drive should we install to? check avail. space */
796
  if (targetdrv == MENUQUIT) goto Quit;
860
  if (targetdrv == MENUQUIT) goto Quit;
797
  if (targetdrv == MENUPREV) goto WelcomeScreen;
861
  if (targetdrv == MENUPREV) goto WelcomeScreen;
798
  bootfilesgen(targetdrv, &locales, sourcedrv); /* generate boot files and other configurations */
862
  bootfilesgen(targetdrv, &locales); /* generate boot files and other configurations */
799
  if (installpackages(targetdrv, sourcedrv) != 0) goto Quit;    /* install packages */
863
  if (installpackages(targetdrv, sourcedrv, &locales) != 0) goto Quit;    /* install packages */
800
  /*localcfg();*/ /* show local params (currency, etc), and propose to change them (based on localcfg) */
864
  /*localcfg();*/ /* show local params (currency, etc), and propose to change them (based on localcfg) */
801
  /*netcfg();*/ /* basic networking config */
865
  /*netcfg();*/ /* basic networking config */
802
  finalreboot(); /* remove the CD and reboot */
866
  finalreboot(); /* remove the CD and reboot */
803
 
867
 
804
 Quit:
868
 Quit: