Try to recover from a mistake of mine where I lost bits.

This commit is contained in:
phil 1997-10-17 22:17:05 +00:00
parent 323c04642b
commit fd205c739f
6 changed files with 66 additions and 20 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: md.c,v 1.3 1997/10/15 04:36:34 phil Exp $ */
/* $NetBSD: md.c,v 1.4 1997/10/17 22:17:56 phil Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@ -46,7 +46,7 @@
/* prototypes */
void md_get_info()
int md_get_info()
{
int i, j;
get_fdisk_info ();
@ -95,7 +95,7 @@ void md_get_info()
process_menu (MENU_noyes);
if (!yesno) {
endwin();
return;
return 0;
}
}
/* Set the partition information for full disk usage. */
@ -127,6 +127,7 @@ void md_get_info()
numbsd = 0;
bsdpart = -1;
overlap = 0;
yesno = 0;
for (i=0; i<4; i++) {
if (part[i][ID] == 165) {
bsdpart = i;
@ -138,9 +139,20 @@ void md_get_info()
}
if (overlap || numbsd != 1) {
msg_display (MSG_reeditpart);
process_menu (MENU_ok);
process_menu (MENU_yesno);
}
} while (numbsd != 1 || overlap);
} while (yesno && (numbsd != 1 || overlap));
if (numbsd == 0) {
msg_display (MSG_nobsdpart);
process_menu (MENU_ok);
return 0;
}
if (numbsd > 1) {
msg_display (MSG_multbsdpart, bsdpart);
process_menu (MENU_ok);
}
ptstart = part[bsdpart][START];
ptsize = part[bsdpart][SIZE];
@ -159,6 +171,8 @@ void md_get_info()
if (usefull)
swapadj = bsec;
return 1;
}
void md_pre_disklabel()

View File

@ -1,4 +1,4 @@
/* $NetBSD: md.h,v 1.2 1997/10/15 04:36:42 phil Exp $ */
/* $NetBSD: md.h,v 1.3 1997/10/17 22:18:06 phil Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@ -55,13 +55,20 @@ EXTERN int usefull;
/* Definition of files to retreive from ftp. */
EXTERN char ftp_prefix[STRSIZE] INIT("/binary/Tarfiles");
EXTERN char ftp_postfix[STRSIZE] INIT(".tar.gz");
EXTERN char *ftp_list[]
EXTERN char dist_postfix[STRSIZE] INIT(".tar.gz");
EXTERN char *dist_list[]
#ifdef MAIN
= { "kern%s%s", "base%s%s", "comp%s%s", "etc%s%s", "games%s%s", "man%s%s",
"misc%s%s", "text%s%s", "CKSUMS", NULL }
#endif
;
EXTERN char *fd_last[]
#ifdef MAIN
= { "ab", "ab", "ab", "ab", "ab", "ab", "ab", "ab", NULL}
#endif
;
EXTERN char *fdtype INIT("msdos");
/* prototypes */

View File

@ -1,4 +1,4 @@
/* $NetBSD: defs.h,v 1.5 1997/10/15 04:35:25 phil Exp $ */
/* $NetBSD: defs.h,v 1.6 1997/10/17 22:17:05 phil Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@ -167,7 +167,7 @@ EXTERN int fs_num;
/* needed prototypes */
/* Machine dependent functions .... */
void md_get_info __P((void));
int md_get_info __P((void));
void md_pre_disklabel __P((void));
void md_post_disklabel __P((void));
void md_post_newfs __P((void));
@ -193,11 +193,11 @@ void do_install __P((void));
void factor __P((long, long *, int, int *));
/* from geom.c */
int get_geom __P((char *, struct disklabel *));
int get_geom __P((char *, struct disklabel *));
/* from net.c */
int get_via_ftp __P((void));
int get_via_nfs __P((void));
int get_via_ftp __P((void));
int get_via_nfs __P((void));
/* From run.c */
int collect __P((int kind, char **buffer, char *name, ...));
@ -212,3 +212,4 @@ void ask_sizemult __P((void));
int ask_ynquestion __P((char *quest, char def, ...));
void extract_dist __P((void));
void run_makedev __P((void));
int get_via_floppy __P((void));

View File

@ -1,4 +1,4 @@
/* $NetBSD: menus.mi.eng,v 1.5 1997/10/15 04:35:48 phil Exp $ */
/* $NetBSD: menus.mi.eng,v 1.6 1997/10/17 22:17:19 phil Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@ -275,3 +275,7 @@ menu nfsbadmount, title " What do you want to do?";
option "Give up", exit, action
{ yesno = 0; };
menu fdremount, title " What do you want to do? ";
option "Try again", exit, action { yesno = 1; };
option "Abort install", exit, action { yesno = 0; };

View File

@ -1,4 +1,4 @@
/* $NetBSD: msg.mi.eng,v 1.5 1997/10/15 04:35:54 phil Exp $ */
/* $NetBSD: msg.mi.eng,v 1.6 1997/10/17 22:17:28 phil Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@ -341,7 +341,7 @@ message realdir
message ftperror
{Ftp could not retreive a file. Do you want to try again?}
message netdir
message distdir
{What directory shall I use for %s? }
message verboseextract
@ -356,6 +356,10 @@ message badls
message endtar
{All your files have now been extracted. Please hit CR to continue.}
message abort
{Your choices have made it impossible to install NetBSD. Install aborted.
}
message abortinst
{The distribution was not successfully loaded. You will need to proceed
by hand. Installation aborted.
@ -397,3 +401,19 @@ using only NetBSD on these file systems, it is recommended that
they are upgraded. Do you want this file system upgraded?
}
message fddev
{What floppy device do you want to use? }
message fdload
{Do you want to load the distribution set "%s"? }
message fdmount
{Please load the floppy containing the file named "%s/%s". }
message fdremount
{The floppy was not mounted successfully. You may:
Try again and put in the floppy containing the file named "%s/%s".
Not load any more files from floppy and abort the process.
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: net.c,v 1.5 1997/10/15 04:36:01 phil Exp $ */
/* $NetBSD: net.c,v 1.6 1997/10/17 22:17:35 phil Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@ -180,7 +180,7 @@ get_via_ftp (void)
strncat (ftp_dir, ftp_prefix, STRSIZE-strlen(ftp_dir));
process_menu (MENU_ftpsource);
msg_prompt (MSG_netdir, dist_dir, dist_dir, STRSIZE, "ftp");
msg_prompt (MSG_distdir, dist_dir, dist_dir, STRSIZE, "ftp");
snprintf (realdir, STRSIZE, "/mnt/%s", dist_dir);
strcpy (dist_dir, realdir);
run_prog ("/bin/mkdir %s", realdir);
@ -195,10 +195,10 @@ get_via_ftp (void)
printf ("chdir (%s)\n", realdir);
#endif
list = ftp_list;
list = dist_list;
endwin();
while (*list) {
snprintf (filename, SSTRSIZE, *list, rels, ftp_postfix);
snprintf (filename, SSTRSIZE, *list, rels, dist_postfix);
if (strcmp ("ftp", ftp_user) == 0)
ret = run_prog("/usr/bin/ftp -a ftp://%s/%s/%s",
ftp_host, ftp_dir,