Tweeks to editing file system partitions, fix for PR4405, adding a method
to reselect the allocation multiplier while editing a disklabel.
This commit is contained in:
parent
ff7fbfe809
commit
2cb88494a3
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: menus.md.eng,v 1.5 1997/10/31 17:15:10 phil Exp $ */
|
||||
/* $NetBSD: menus.md.eng,v 1.6 1997/10/31 23:00:57 phil Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
@ -159,6 +159,7 @@ menu editfsparts, y=15, exit;
|
||||
option "Change f", action { editpart = F;}, sub menu edfspart;
|
||||
option "Change g", action { editpart = G;}, sub menu edfspart;
|
||||
option "Change h", action { editpart = H;}, sub menu edfspart;
|
||||
option "Set new allocation size", action { reask_sizemult(); };
|
||||
|
||||
|
||||
menu md_distcustom, exit, title " Selection toggles inclusion";
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: menus.md.eng,v 1.4 1997/10/31 17:15:18 phil Exp $ */
|
||||
/* $NetBSD: menus.md.eng,v 1.5 1997/10/31 23:01:01 phil Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
@ -51,6 +51,7 @@ menu editfsparts, y=15, exit;
|
||||
option "Change f", action { editpart = F;}, sub menu edfspart;
|
||||
option "Change g", action { editpart = G;}, sub menu edfspart;
|
||||
option "Change h", action { editpart = H;}, sub menu edfspart;
|
||||
option "Set new allocation size", action { reask_sizemult(); };
|
||||
|
||||
menu md_distcustom, exit, title " Selection toggles inclusion";
|
||||
display action { show_cur_distsets (); };
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: menus.md.eng,v 1.3 1997/10/31 17:15:22 phil Exp $ */
|
||||
/* $NetBSD: menus.md.eng,v 1.4 1997/10/31 23:01:06 phil Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
@ -51,11 +51,15 @@ menu editfsparts, y=15, exit;
|
||||
option "Change f", action { editpart = F;}, sub menu edfspart;
|
||||
option "Change g", action { editpart = G;}, sub menu edfspart;
|
||||
option "Change h", action { editpart = H;}, sub menu edfspart;
|
||||
option "Set new allocation size", action { reask_sizemult(); };
|
||||
|
||||
menu md_distcustom, exit, title " Selection toggles inclusion";
|
||||
menu md_distcustom, x=30, y=10, exit, title " Selection toggles inclusion";
|
||||
display action { show_cur_distsets (); };
|
||||
option "Compiler Tools", action { toggle_getit (3); };
|
||||
option "Games", action { toggle_getit (4); };
|
||||
option "Online Manual Pages", action { toggle_getit (5); };
|
||||
option "Miscellaneous", action { toggle_getit (6); };
|
||||
option "Text Processing Tools", action { toggle_getit (7); };
|
||||
option "X11 clients", action { toggle_getit (8); };
|
||||
option "X11 servers", action { toggle_getit (9); };
|
||||
option "X programming", action { toggle_getit (10); };
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: defs.h,v 1.9 1997/10/29 01:06:42 phil Exp $ */
|
||||
/* $NetBSD: defs.h,v 1.10 1997/10/31 23:00:32 phil Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
/* Round up to the next full cylinder size */
|
||||
#define NUMSEC(size,sizemult,cylsize) \
|
||||
((sizemult == 1) ? (size) : \
|
||||
((size == -1) ? -1 : (sizemult == 1) ? (size) : \
|
||||
(((size)*(sizemult)+(cylsize)-1)/(cylsize))*(cylsize))
|
||||
|
||||
/* Types */
|
||||
@ -110,9 +110,14 @@ EXTERN char *disktype; /* ST506, SCSI, ... */
|
||||
/* Used in editing partitions ... BSD disklabel and others */
|
||||
EXTERN int editpart;
|
||||
|
||||
/* Final known sizes for the NetBSD partition, NetBSD disk sizes. */
|
||||
EXTERN int ptstart, ptsize;
|
||||
EXTERN int fsdsize, fsptsize;
|
||||
/* Partition start and size in disk sectors. */
|
||||
EXTERN int ptstart, ptsize;
|
||||
|
||||
/* File system disk size. File system partition size. May not include
|
||||
full disk size. */
|
||||
EXTERN int fsdsize, fsptsize;
|
||||
|
||||
|
||||
EXTERN int fsdmb;
|
||||
EXTERN int minfsdmb;
|
||||
EXTERN int partstart;
|
||||
@ -224,6 +229,7 @@ void do_upgrade __P((void));
|
||||
/* from util.c */
|
||||
void get_ramsize __P((void));
|
||||
void ask_sizemult __P((void));
|
||||
void reask_sizemult __P((void));
|
||||
int ask_ynquestion __P((char *quest, char def, ...));
|
||||
void extract_dist __P((void));
|
||||
void run_makedev __P((void));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: disks.c,v 1.6 1997/10/29 01:06:48 phil Exp $ */
|
||||
/* $NetBSD: disks.c,v 1.7 1997/10/31 23:00:37 phil Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
@ -168,10 +168,12 @@ void disp_cur_fspart (int disp, int showall)
|
||||
msg_display_add (MSG_fspart_head);
|
||||
for (i=start; i<stop; i++) {
|
||||
if (showall || bsdlabel[i][D_SIZE] > 0) {
|
||||
msg_printf_add (" %c:%10d%10d %6s",
|
||||
msg_printf_add (" %c: %9d %9d %9d %6s",
|
||||
'a'+i,
|
||||
bsdlabel[i][D_SIZE]/sizemult ,
|
||||
bsdlabel[i][D_OFFSET]/sizemult,
|
||||
(bsdlabel[i][D_OFFSET] +
|
||||
bsdlabel[i][D_SIZE])/sizemult,
|
||||
fstype[bsdlabel[i][D_FSTYPE]]);
|
||||
if (bsdlabel[i][D_FSTYPE] == T_42BSD)
|
||||
msg_printf_add ("%6d%6d %s",
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: main.c,v 1.1.1.1 1997/09/26 23:02:53 phil Exp $ */
|
||||
/* $NetBSD: main.c,v 1.2 1997/10/31 23:00:40 phil Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
@ -47,12 +47,19 @@
|
||||
#include "msg_defs.h"
|
||||
#include "menu_defs.h"
|
||||
|
||||
int main(void);
|
||||
int main(int argc, char **argv);
|
||||
|
||||
int main(void)
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
WINDOW *win;
|
||||
|
||||
/* Check for TERM ... */
|
||||
if (!getenv("TERM")) {
|
||||
fprintf (stderr, "%s: TERM environment varible not set.\n",
|
||||
argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* initialize message window */
|
||||
win = newwin(22,78,1,1);
|
||||
msg_window(win);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: menus.mi.eng,v 1.10 1997/10/30 00:03:32 phil Exp $ */
|
||||
/* $NetBSD: menus.mi.eng,v 1.11 1997/10/31 23:00:45 phil Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
@ -66,12 +66,14 @@ menu netbsd, title " NetBSD-@@VERSION@@ Install System";
|
||||
option "Reboot the computer", exit,
|
||||
action (endwin) { run_prog("/sbin/reboot"); };
|
||||
option "Utility menu", sub menu utility;
|
||||
option "Exit Install System", exit, action (endwin) {};
|
||||
|
||||
menu utility, title " NetBSD-@@VERSION@@ Utility", exit;
|
||||
option "Run /bin/sh",
|
||||
action (endwin) { system("/bin/sh"); puts(CL); };
|
||||
option "Configure network",
|
||||
action { config_network(); };
|
||||
/* option "Partition a disk"; XXX add later. */
|
||||
option "Halt the system", exit,
|
||||
action (endwin) { run_prog("/sbin/halt"); };
|
||||
|
||||
@ -164,6 +166,8 @@ menu edfspart, title " Change what? ", exit, y=15;
|
||||
start = NUMSEC(atoi(buf),sizemult,dlcylsize);
|
||||
msg_prompt_add (MSG_size, NULL, buf, 40);
|
||||
size = NUMSEC(atoi(buf),sizemult,dlcylsize);
|
||||
if (size == -1)
|
||||
size = dlsize - start;
|
||||
if (editpart == 1 &&
|
||||
bsdlabel[editpart][D_FSTYPE] == T_SWAP)
|
||||
size -= swapadj;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: msg.mi.eng,v 1.9 1997/10/29 01:06:55 phil Exp $ */
|
||||
/* $NetBSD: msg.mi.eng,v 1.10 1997/10/31 23:00:48 phil Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
@ -194,8 +194,8 @@ message fspart
|
||||
|
||||
message fspart_head
|
||||
{
|
||||
id: Size Offset FStype Bsize Fsize Mount point
|
||||
--- ---- ------ ------ ----- ----- -----------
|
||||
id: Size Offset End FStype Bsize Fsize Mount point
|
||||
--- ---- ------ --- ------ ----- ----- -----------
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: util.c,v 1.8 1997/10/30 00:03:36 phil Exp $ */
|
||||
/* $NetBSD: util.c,v 1.9 1997/10/31 23:00:50 phil Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
@ -65,7 +65,7 @@ void get_ramsize(void)
|
||||
|
||||
static int asked = 0;
|
||||
|
||||
void ask_sizemult ()
|
||||
void ask_sizemult (void)
|
||||
{
|
||||
if (!asked) {
|
||||
msg_display (MSG_sizechoice, dlcylsize);
|
||||
@ -74,6 +74,12 @@ void ask_sizemult ()
|
||||
asked = 1;
|
||||
}
|
||||
|
||||
void reask_sizemult (void)
|
||||
{
|
||||
asked = 0;
|
||||
ask_sizemult ();
|
||||
}
|
||||
|
||||
/* Returns 1 for "y" or "Y" and "n" otherwise. CR => default. */
|
||||
int
|
||||
ask_ynquestion (char *quest, char def, ...)
|
||||
|
Loading…
Reference in New Issue
Block a user