summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-07-31 09:29:35 +0000
committerjkh <jkh@FreeBSD.org>1996-07-31 09:29:35 +0000
commit2a50131bb0b7b79f7cdd0457a4a51e8b0e3a53c7 (patch)
tree59d4a07521d6bc7257b6347c06b8bb84ae59b8f5 /usr.sbin
parent7f56d763c56f6a2b0b723c33a94237927069ac32 (diff)
downloadFreeBSD-src-2a50131bb0b7b79f7cdd0457a4a51e8b0e3a53c7.zip
FreeBSD-src-2a50131bb0b7b79f7cdd0457a4a51e8b0e3a53c7.tar.gz
Don't munge keystrokes.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/sade/disks.c6
-rw-r--r--usr.sbin/sade/install.c29
-rw-r--r--usr.sbin/sade/label.c8
-rw-r--r--usr.sbin/sade/sade.h4
-rw-r--r--usr.sbin/sysinstall/disks.c6
-rw-r--r--usr.sbin/sysinstall/install.c29
-rw-r--r--usr.sbin/sysinstall/label.c8
-rw-r--r--usr.sbin/sysinstall/sysinstall.h4
8 files changed, 54 insertions, 40 deletions
diff --git a/usr.sbin/sade/disks.c b/usr.sbin/sade/disks.c
index 1d94f87..eebad4b 100644
--- a/usr.sbin/sade/disks.c
+++ b/usr.sbin/sade/disks.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: disks.c,v 1.56 1996/07/31 06:20:54 jkh Exp $
+ * $Id: disks.c,v 1.57 1996/07/31 09:10:39 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -188,7 +188,9 @@ diskPartition(Device *dev, Disk *d)
msg = NULL;
}
- key = toupper(getch());
+ key = getch();
+ if (islower(key))
+ key = toupper(key);
switch (key) {
case '\014': /* ^L */
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c
index 05c3302..6c0f2d0 100644
--- a/usr.sbin/sade/install.c
+++ b/usr.sbin/sade/install.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: install.c,v 1.115 1996/07/16 17:11:41 jkh Exp $
+ * $Id: install.c,v 1.116 1996/07/31 06:20:55 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -56,7 +56,7 @@ static void create_termcap(void);
static void installConfigure(void);
Boolean
-checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
+checkLabels(Boolean whinge, Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
{
Device **devs;
Boolean status;
@@ -86,8 +86,9 @@ checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
if (c2->type == part && c2->subtype != FS_SWAP && c2->private_data) {
if (c2->flags & CHUNK_IS_ROOT) {
if (rootdev) {
- msgConfirm("WARNING: You have more than one root device set?!\n"
- "Using the first one found.");
+ if (whinge)
+ msgConfirm("WARNING: You have more than one root device set?!\n"
+ "Using the first one found.");
continue;
}
else {
@@ -98,8 +99,9 @@ checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
}
else if (!strcmp(((PartInfo *)c2->private_data)->mountpoint, "/usr")) {
if (usrdev) {
- msgConfirm("WARNING: You have more than one /usr filesystem.\n"
- "Using the first one found.");
+ if (whinge)
+ msgConfirm("WARNING: You have more than one /usr filesystem.\n"
+ "Using the first one found.");
continue;
}
else {
@@ -110,8 +112,9 @@ checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
}
else if (!strcmp(((PartInfo *)c2->private_data)->mountpoint, "/var")) {
if (vardev) {
- msgConfirm("WARNING: You have more than one /var filesystem.\n"
- "Using the first one found.");
+ if (whinge)
+ msgConfirm("WARNING: You have more than one /var filesystem.\n"
+ "Using the first one found.");
continue;
}
else {
@@ -154,23 +157,23 @@ checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
*udev = usrdev;
*vdev = vardev;
- if (!rootdev) {
+ if (!rootdev && whinge) {
msgConfirm("No root device found - you must label a partition as /\n"
"in the label editor.");
status = FALSE;
}
- if (!swapdev) {
+ if (!swapdev && whinge) {
msgConfirm("No swap devices found - you must create at least one\n"
"swap partition.");
status = FALSE;
}
- if (!usrdev) {
+ if (!usrdev && whinge) {
msgConfirm("WARNING: No /usr filesystem found. This is not technically\n"
"an error if your root filesystem is big enough (or you later\n"
"intend to mount your /usr filesystem over NFS), but it may otherwise\n"
"cause you trouble if you're not exactly sure what you are doing!");
}
- if (!vardev) {
+ if (!vardev && whinge) {
msgConfirm("WARNING: No /var filesystem found. This is not technically\n"
"an error if your root filesystem is big enough (or you later\n"
"intend to link /var to someplace else), but it may otherwise\n"
@@ -676,7 +679,7 @@ installFilesystems(dialogMenuItem *self)
str = variable_get(SYSTEM_STATE);
- if (!checkLabels(&rootdev, &swapdev, &usrdev, &vardev))
+ if (!checkLabels(TRUE, &rootdev, &swapdev, &usrdev, &vardev))
return DITEM_FAILURE;
if (rootdev)
diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c
index 5b49ed2..e7f3c31 100644
--- a/usr.sbin/sade/label.c
+++ b/usr.sbin/sade/label.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: label.c,v 1.53 1996/07/14 01:54:39 jkh Exp $
+ * $Id: label.c,v 1.54 1996/07/31 06:20:57 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -497,7 +497,9 @@ diskLabel(char *str)
move(23, 0);
clrtoeol();
}
- key = toupper(getch());
+ key = getch();
+ if (islower(key))
+ key = toupper(key);
switch (key) {
int i;
static char _msg[40];
@@ -554,7 +556,7 @@ diskLabel(char *str)
char *cp;
Chunk *rootdev, *swapdev, *usrdev, *vardev;
- (void)checkLabels(&rootdev, &swapdev, &usrdev, &vardev);
+ (void)checkLabels(FALSE, &rootdev, &swapdev, &usrdev, &vardev);
if (!rootdev) {
cp = variable_get(VAR_ROOT_SIZE);
tmp = Create_Chunk_DWIM(label_chunk_info[here].c->disk, label_chunk_info[here].c,
diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h
index 49c6dc4..84c35fd 100644
--- a/usr.sbin/sade/sade.h
+++ b/usr.sbin/sade/sade.h
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: sysinstall.h,v 1.75 1996/07/16 17:11:45 jkh Exp $
+ * $Id: sysinstall.h,v 1.76 1996/07/31 06:20:59 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -466,7 +466,7 @@ void index_print(PkgNodePtr top, int level);
int index_extract(Device *dev, PkgNodePtr top, PkgNodePtr plist);
/* install.c */
-extern Boolean checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev);
+extern Boolean checkLabels(Boolean whinge, Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev);
extern int installCommit(dialogMenuItem *self);
extern int installCustomCommit(dialogMenuItem *self);
extern int installExpress(dialogMenuItem *self);
diff --git a/usr.sbin/sysinstall/disks.c b/usr.sbin/sysinstall/disks.c
index 1d94f87..eebad4b 100644
--- a/usr.sbin/sysinstall/disks.c
+++ b/usr.sbin/sysinstall/disks.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: disks.c,v 1.56 1996/07/31 06:20:54 jkh Exp $
+ * $Id: disks.c,v 1.57 1996/07/31 09:10:39 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -188,7 +188,9 @@ diskPartition(Device *dev, Disk *d)
msg = NULL;
}
- key = toupper(getch());
+ key = getch();
+ if (islower(key))
+ key = toupper(key);
switch (key) {
case '\014': /* ^L */
diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c
index 05c3302..6c0f2d0 100644
--- a/usr.sbin/sysinstall/install.c
+++ b/usr.sbin/sysinstall/install.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: install.c,v 1.115 1996/07/16 17:11:41 jkh Exp $
+ * $Id: install.c,v 1.116 1996/07/31 06:20:55 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -56,7 +56,7 @@ static void create_termcap(void);
static void installConfigure(void);
Boolean
-checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
+checkLabels(Boolean whinge, Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
{
Device **devs;
Boolean status;
@@ -86,8 +86,9 @@ checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
if (c2->type == part && c2->subtype != FS_SWAP && c2->private_data) {
if (c2->flags & CHUNK_IS_ROOT) {
if (rootdev) {
- msgConfirm("WARNING: You have more than one root device set?!\n"
- "Using the first one found.");
+ if (whinge)
+ msgConfirm("WARNING: You have more than one root device set?!\n"
+ "Using the first one found.");
continue;
}
else {
@@ -98,8 +99,9 @@ checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
}
else if (!strcmp(((PartInfo *)c2->private_data)->mountpoint, "/usr")) {
if (usrdev) {
- msgConfirm("WARNING: You have more than one /usr filesystem.\n"
- "Using the first one found.");
+ if (whinge)
+ msgConfirm("WARNING: You have more than one /usr filesystem.\n"
+ "Using the first one found.");
continue;
}
else {
@@ -110,8 +112,9 @@ checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
}
else if (!strcmp(((PartInfo *)c2->private_data)->mountpoint, "/var")) {
if (vardev) {
- msgConfirm("WARNING: You have more than one /var filesystem.\n"
- "Using the first one found.");
+ if (whinge)
+ msgConfirm("WARNING: You have more than one /var filesystem.\n"
+ "Using the first one found.");
continue;
}
else {
@@ -154,23 +157,23 @@ checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev)
*udev = usrdev;
*vdev = vardev;
- if (!rootdev) {
+ if (!rootdev && whinge) {
msgConfirm("No root device found - you must label a partition as /\n"
"in the label editor.");
status = FALSE;
}
- if (!swapdev) {
+ if (!swapdev && whinge) {
msgConfirm("No swap devices found - you must create at least one\n"
"swap partition.");
status = FALSE;
}
- if (!usrdev) {
+ if (!usrdev && whinge) {
msgConfirm("WARNING: No /usr filesystem found. This is not technically\n"
"an error if your root filesystem is big enough (or you later\n"
"intend to mount your /usr filesystem over NFS), but it may otherwise\n"
"cause you trouble if you're not exactly sure what you are doing!");
}
- if (!vardev) {
+ if (!vardev && whinge) {
msgConfirm("WARNING: No /var filesystem found. This is not technically\n"
"an error if your root filesystem is big enough (or you later\n"
"intend to link /var to someplace else), but it may otherwise\n"
@@ -676,7 +679,7 @@ installFilesystems(dialogMenuItem *self)
str = variable_get(SYSTEM_STATE);
- if (!checkLabels(&rootdev, &swapdev, &usrdev, &vardev))
+ if (!checkLabels(TRUE, &rootdev, &swapdev, &usrdev, &vardev))
return DITEM_FAILURE;
if (rootdev)
diff --git a/usr.sbin/sysinstall/label.c b/usr.sbin/sysinstall/label.c
index 5b49ed2..e7f3c31 100644
--- a/usr.sbin/sysinstall/label.c
+++ b/usr.sbin/sysinstall/label.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: label.c,v 1.53 1996/07/14 01:54:39 jkh Exp $
+ * $Id: label.c,v 1.54 1996/07/31 06:20:57 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -497,7 +497,9 @@ diskLabel(char *str)
move(23, 0);
clrtoeol();
}
- key = toupper(getch());
+ key = getch();
+ if (islower(key))
+ key = toupper(key);
switch (key) {
int i;
static char _msg[40];
@@ -554,7 +556,7 @@ diskLabel(char *str)
char *cp;
Chunk *rootdev, *swapdev, *usrdev, *vardev;
- (void)checkLabels(&rootdev, &swapdev, &usrdev, &vardev);
+ (void)checkLabels(FALSE, &rootdev, &swapdev, &usrdev, &vardev);
if (!rootdev) {
cp = variable_get(VAR_ROOT_SIZE);
tmp = Create_Chunk_DWIM(label_chunk_info[here].c->disk, label_chunk_info[here].c,
diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h
index 49c6dc4..84c35fd 100644
--- a/usr.sbin/sysinstall/sysinstall.h
+++ b/usr.sbin/sysinstall/sysinstall.h
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: sysinstall.h,v 1.75 1996/07/16 17:11:45 jkh Exp $
+ * $Id: sysinstall.h,v 1.76 1996/07/31 06:20:59 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -466,7 +466,7 @@ void index_print(PkgNodePtr top, int level);
int index_extract(Device *dev, PkgNodePtr top, PkgNodePtr plist);
/* install.c */
-extern Boolean checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev);
+extern Boolean checkLabels(Boolean whinge, Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev);
extern int installCommit(dialogMenuItem *self);
extern int installCustomCommit(dialogMenuItem *self);
extern int installExpress(dialogMenuItem *self);
OpenPOWER on IntegriCloud