summaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1997-09-16 10:14:23 +0000
committerjkh <jkh@FreeBSD.org>1997-09-16 10:14:23 +0000
commitd387f3a0a99b84c361775c58a44002ed3511c815 (patch)
tree0a3cae00e9faa8ad5df5d833845a3dbf728e63b4 /release
parent1bd32b987b7336e1c1c99ba6a70f36b84af119ed (diff)
downloadFreeBSD-src-d387f3a0a99b84c361775c58a44002ed3511c815.zip
FreeBSD-src-d387f3a0a99b84c361775c58a44002ed3511c815.tar.gz
MF22: pst's changes.
Submitted by: pst
Diffstat (limited to 'release')
-rw-r--r--release/sysinstall/dist.c9
-rw-r--r--release/sysinstall/label.c38
-rw-r--r--release/sysinstall/package.c9
-rw-r--r--release/sysinstall/termcap.c13
4 files changed, 39 insertions, 30 deletions
diff --git a/release/sysinstall/dist.c b/release/sysinstall/dist.c
index ed40651..f0f3d19 100644
--- a/release/sysinstall/dist.c
+++ b/release/sysinstall/dist.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: dist.c,v 1.111 1997/07/01 03:50:58 jkh Exp $
+ * $Id: dist.c,v 1.112 1997/09/09 16:26:29 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -390,13 +390,14 @@ distSetByName(Distribution *dist, char *name)
/* This is shorthand for "dist currently disabled" */
if (!dist[i].my_dir)
continue;
- else if (!strcmp(dist[i].my_name, name)) {
+ if (!strcmp(dist[i].my_name, name)) {
*(dist[i].my_mask) |= dist[i].my_bit;
status = TRUE;
}
- else if (dist[i].my_dist) {
- if (distSetByName(dist[i].my_dist, name))
+ if (dist[i].my_dist) {
+ if (distSetByName(dist[i].my_dist, name)) {
status = TRUE;
+ }
}
}
return status;
diff --git a/release/sysinstall/label.c b/release/sysinstall/label.c
index 0e745ed..161560d 100644
--- a/release/sysinstall/label.c
+++ b/release/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.72 1997/08/11 13:08:26 jkh Exp $
+ * $Id: label.c,v 1.73 1997/09/09 16:32:01 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -756,25 +756,27 @@ diskLabel(char *str)
sz = atoi(cp) * ONE_MEG;
else
sz = space_free(label_chunk_info[here].c);
- if (!sz || sz < (USR_MIN_SIZE * ONE_MEG)) {
- msgConfirm("Less than %dMB free for /usr - you will need to\n"
- "partition your disk manually with a custom install!", USR_MIN_SIZE);
- clear_wins();
- break;
- }
+ if (sz) {
+ if (sz < (USR_MIN_SIZE * ONE_MEG)) {
+ msgConfirm("Less than %dMB free for /usr - you will need to\n"
+ "partition your disk manually with a custom install!", USR_MIN_SIZE);
+ clear_wins();
+ break;
+ }
- tmp = Create_Chunk_DWIM(label_chunk_info[here].c->disk,
- label_chunk_info[here].c,
- sz, part, FS_BSDFFS, 0);
- if (!tmp) {
- msgConfirm("Unable to create the /usr partition. Not enough space?\n"
- "You will need to partition your disk manually with a custom install!");
- clear_wins();
- break;
+ tmp = Create_Chunk_DWIM(label_chunk_info[here].c->disk,
+ label_chunk_info[here].c,
+ sz, part, FS_BSDFFS, 0);
+ if (!tmp) {
+ msgConfirm("Unable to create the /usr partition. Not enough space?\n"
+ "You will need to partition your disk manually with a custom install!");
+ clear_wins();
+ break;
+ }
+ tmp->private_data = new_part("/usr", TRUE, tmp->size);
+ tmp->private_free = safe_free;
+ record_label_chunks(devs);
}
- tmp->private_data = new_part("/usr", TRUE, tmp->size);
- tmp->private_free = safe_free;
- record_label_chunks(devs);
}
/* At this point, we're reasonably "labelled" */
if (((cp = variable_get(DISK_LABELLED)) == NULL) || (strcmp(cp, "written")))
diff --git a/release/sysinstall/package.c b/release/sysinstall/package.c
index ba56291..25cd40b 100644
--- a/release/sysinstall/package.c
+++ b/release/sysinstall/package.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: package.c,v 1.61 1997/03/22 15:20:51 jkh Exp $
+ * $Id: package.c,v 1.62 1997/06/13 17:55:32 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -96,7 +96,7 @@ int
package_extract(Device *dev, char *name, Boolean depended)
{
char path[511];
- int ret;
+ int ret, last_msg = 0;
FILE *fp;
/* Check to make sure it's not already there */
@@ -165,7 +165,10 @@ package_extract(Device *dev, char *name, Boolean depended)
seconds = stop.tv_sec + (stop.tv_usec / 1000000.0);
if (!seconds)
seconds = 1;
- msgInfo("%10d bytes read from package %s @ %4.1f KBytes/second", tot, name, (tot / seconds) / 1024.0);
+ if (seconds != last_msg) {
+ last_msg = seconds;
+ msgInfo("%10d bytes read from package %s @ %4.1f KBytes/second", tot, name, (tot / seconds) / 1024.0);
+ }
/* Write it out */
if (sigpipe_caught || write(pfd[1], buf, i) != i) {
msgInfo("Write failure to pkg_add! Package may be corrupt.");
diff --git a/release/sysinstall/termcap.c b/release/sysinstall/termcap.c
index fa9c19f..1569479 100644
--- a/release/sysinstall/termcap.c
+++ b/release/sysinstall/termcap.c
@@ -94,17 +94,20 @@ set_termcap(void)
if (setenv("TERMCAP", termcap, 1) < 0)
return -1;
}
- if (DebugFD == -1)
- DebugFD = dup(1);
+ if (DebugFD < 0)
+ DebugFD = open("/dev/null", O_RDWR, 0);
}
else {
int i, on;
if (getpid() == 1) {
DebugFD = open("/dev/ttyv1", O_WRONLY);
- on = 1;
- i = ioctl(DebugFD, TIOCCONS, (char *)&on);
- msgDebug("ioctl(%d, TIOCCONS, NULL) = %d (%s)\n", DebugFD, i, !i ? "success" : strerror(errno));
+ if (DebugFD != -1) {
+ on = 1;
+ i = ioctl(DebugFD, TIOCCONS, (char *)&on);
+ msgDebug("ioctl(%d, TIOCCONS, NULL) = %d (%s)\n",
+ DebugFD, i, !i ? "success" : strerror(errno));
+ }
}
if (ColorDisplay) {
if (!term) {
OpenPOWER on IntegriCloud