summaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-05-26 11:21:53 +0000
committerjkh <jkh@FreeBSD.org>1995-05-26 11:21:53 +0000
commite6ff7ba685dffe5e2dd003483a1cbc4d78813516 (patch)
treecb58d6e4cb429f0ec2db03949f25623e0d654add /release
parentb91802a259402deeacfad863e6ba5e4147a942c6 (diff)
downloadFreeBSD-src-e6ff7ba685dffe5e2dd003483a1cbc4d78813516.zip
FreeBSD-src-e6ff7ba685dffe5e2dd003483a1cbc4d78813516.tar.gz
This should fix the last of the ftp path problems.
It was all a bit more complex than it first looked.
Diffstat (limited to 'release')
-rw-r--r--release/sysinstall/label.c18
-rw-r--r--release/sysinstall/media_strategy.c12
-rw-r--r--release/sysinstall/menus.c16
3 files changed, 26 insertions, 20 deletions
diff --git a/release/sysinstall/label.c b/release/sysinstall/label.c
index 02b9ea3..9a6957f 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.24 1995/05/25 01:22:16 jkh Exp $
+ * $Id: label.c,v 1.25 1995/05/25 18:48:26 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -201,7 +201,7 @@ get_mountpoint(struct chunk *old)
val = msgGetInput(old && old->private ? ((PartInfo *)old->private)->mountpoint : NULL,
"Please specify a mount point for the partition");
- if (!val) {
+ if (!val || !*val) {
if (!old)
return NULL;
else {
@@ -369,8 +369,7 @@ print_label_chunks(void)
}
for (j = 0; j < MAX_MOUNT_NAME && mountpoint[j]; j++)
onestr[PART_MOUNT_COL + j] = mountpoint[j];
- snprintf(num, 10, "%4ldMB", label_chunk_info[i].c->size ?
- label_chunk_info[i].c->size / ONE_MEG : 0);
+ snprintf(num, 10, "%4ldMB", label_chunk_info[i].c->size ? label_chunk_info[i].c->size / ONE_MEG : 0);
memcpy(onestr + PART_SIZE_COL, num, strlen(num));
memcpy(onestr + PART_NEWFS_COL, newfs, strlen(newfs));
onestr[PART_NEWFS_COL + strlen(newfs)] = '\0';
@@ -495,8 +494,15 @@ diskLabelEditor(char *str)
size *= ONE_MEG;
else if (toupper(*cp) == 'C')
size *= (label_chunk_info[here].c->disk->bios_hd * label_chunk_info[here].c->disk->bios_sect);
- else if (*cp == '%')
- size = sz * (size * 0.10);
+ else if (*cp == '%') {
+ float fsz, fsize;
+
+ fsz = (float)sz;
+ fsize = (float)size;
+ fsize *= 0.10;
+ fsz *= fsize;
+ size = (int)fsz;
+ }
}
type = get_partition_type();
if (type == PART_NONE)
diff --git a/release/sysinstall/media_strategy.c b/release/sysinstall/media_strategy.c
index 1e76cdf..57e92d5 100644
--- a/release/sysinstall/media_strategy.c
+++ b/release/sysinstall/media_strategy.c
@@ -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: media_strategy.c,v 1.24 1995/05/26 10:20:47 jkh Exp $
+ * $Id: media_strategy.c,v 1.25 1995/05/26 10:58:51 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -711,8 +711,10 @@ mediaGetFTP(char *dist, char *path)
const char *tmp;
struct attribs *dist_attr;
+ if (!path)
+ path = "";
msgNotify("Attempting to retreive `%s' over FTP", dist);
- snprintf(buf, PATH_MAX, "/stand/info/%s%s.inf", path ? path : "", dist);
+ snprintf(buf, PATH_MAX, "/stand/info/%s%s.inf", path, dist);
if (!access(buf, R_OK)) {
msgDebug("Parsing attributes file for %s\n", dist);
dist_attr = safe_malloc(sizeof(struct attribs) * MAX_ATTRIBS);
@@ -731,11 +733,11 @@ mediaGetFTP(char *dist, char *path)
/* Take the lack of an info file to mean we're a fully qualified name */
if (!numchunks) {
- sprintf(buf, "%s%s", path ? path : "", dist);
+ sprintf(buf, "%s%s", path, dist);
return(FtpGet(ftp, buf));
}
else if (numchunks == 1) {
- snprintf(buf, 512, "%s.aa", dist);
+ snprintf(buf, 512, "%s%s.aa", path, dist);
return(FtpGet(ftp, buf));
}
@@ -764,7 +766,7 @@ mediaGetFTP(char *dist, char *path)
char buffer[10240];
int n;
- snprintf(buf, 512, "%s.%c%c", dist, (chunk / 26) + 'a', (chunk % 26) + 'a');
+ snprintf(buf, 512, "%s%s.%c%c", path, dist, (chunk / 26) + 'a', (chunk % 26) + 'a');
fd = FtpGet(ftp, buf);
if (fd < 0)
diff --git a/release/sysinstall/menus.c b/release/sysinstall/menus.c
index 7ba222b..0bf0160 100644
--- a/release/sysinstall/menus.c
+++ b/release/sysinstall/menus.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: menus.c,v 1.30 1995/05/25 18:48:29 jkh Exp $
+ * $Id: menus.c,v 1.31 1995/05/26 08:41:46 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -590,16 +590,14 @@ your disk until you select the \"Install\" menu item (and even then, only\n\
after a final confirmation). Select Cancel to leave this menu.",
"Press F1 to read the installation guide",
"install.hlp",
- { { "Distributions", "Choose the type of installation you want", /* T */
- DMENU_SUBMENU, &MenuInstallType, 0, 0 },
- { "Media", "Choose the installation media type", /* M */
- DMENU_SUBMENU, &MenuMedia, 0, 0 },
- { "Partition", "Allocate disk space for FreeBSD", /* P */
+ { { "Partition", "Allocate disk space for FreeBSD", /* P */
DMENU_CALL, diskPartitionEditor, 0, 0 },
{ "Label", "Label allocated disk partitions", /* L */
DMENU_CALL, diskLabelEditor, 0, 0 },
- { "Networking", "Configure this host on a network", /* N */
- DMENU_CALL, tcpDeviceSelect, 0, 0 },
+ { "Distributions", "Choose the type of installation you want", /* T */
+ DMENU_SUBMENU, &MenuInstallType, 0, 0 },
+ { "Media", "Choose the installation media type", /* M */
+ DMENU_SUBMENU, &MenuMedia, 0, 0 },
{ "Install", "Install FreeBSD onto your hard disk(s)", /* I */
DMENU_CALL, installCommit, 0, 0 },
{ "Configure", "Do post-install configuration of FreeBSD", /* C */
@@ -643,7 +641,7 @@ When you're done, select Cancel",
"configure.hlp",
{ { "Add User", "Add users to the system",
DMENU_SYSTEM_COMMAND, "adduser", 0, 0 },
- { "Networking", "Configure network",
+ { "Networking", "Configure additional network devices",
DMENU_CALL, tcpDeviceSelect, 0, 0 },
{ "Time Zone", "Set which time zone you're in",
DMENU_SYSTEM_COMMAND, "tzsetup", 0, 0 },
OpenPOWER on IntegriCloud