Fix a long-standing bug with the label editor I just found (you could

mount two dos partitions with the same name).

Neaten up a dialog box that was encroaching on the right edge.
This commit is contained in:
Jordan K. Hubbard 1997-03-11 17:51:01 +00:00
parent bdb5b1dbdc
commit 7d98f8beea
5 changed files with 46 additions and 43 deletions

View File

@ -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.100 1997/03/08 12:57:41 jkh Exp $
* $Id: dist.c,v 1.101 1997/03/10 21:11:53 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -311,15 +311,15 @@ distMaybeSetPorts(dialogMenuItem *self)
{
dialog_clear_norefresh();
if (!msgYesNo("Would you like to install the FreeBSD ports collection?\n\n"
"This will give you ready access to over 800 ported software\n"
"packages, though at the cost of around 35MB of space when \"clean\"\n"
"and possibly much more than that if a lot of the distribution tarballs\n"
"are loaded (unless you have the 2nd CD from a FreeBSD CDROM distribution\n"
"available and can mount it on /cdrom, of course, in which case this is far\n"
"less of a problem).\n\n"
"This will give you ready access to over 800 ported software packages,\n"
"though at a cost of around 35MB of disk space when \"clean\" and possibly\n"
"much more than that if a lot of the distribution tarballs are loaded\n"
"(unless you have the 2nd CD from a FreeBSD CDROM distribution available\n"
"and can mount it on /cdrom, in which case this is far less of a problem).\n\n"
"The ports collection is a very valuable resource and, if you have at least\n"
"100MB to spare in your /usr partition, well worth having around.\n\n"
"For more information on the ports collection, see http://www.freebsd.org/ports\n"))
"For more information on the ports collection & the latest ports, visit:\n"
" http://www.freebsd.org/ports\n"))
Dists |= DIST_PORTS;
else
Dists &= ~DIST_PORTS;

View File

@ -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.68 1997/02/22 14:11:50 peter Exp $
* $Id: label.c,v 1.69 1997/03/08 16:17:49 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -150,7 +150,8 @@ check_conflict(char *name)
int i;
for (i = 0; label_chunk_info[i].c; i++)
if (label_chunk_info[i].type == PART_FILESYSTEM && label_chunk_info[i].c->private_data
if ((label_chunk_info[i].type == PART_FILESYSTEM || label_chunk_info[i].type == PART_FAT)
&& label_chunk_info[i].c->private_data
&& !strcmp(((PartInfo *)label_chunk_info[i].c->private_data)->mountpoint, name))
return TRUE;
return FALSE;
@ -837,13 +838,13 @@ diskLabel(char *str)
case 'T': /* Toggle newfs state */
if (label_chunk_info[here].type == PART_FILESYSTEM) {
PartInfo *pi = ((PartInfo *)label_chunk_info[here].c->private_data);
label_chunk_info[here].c->private_data =
new_part(pi ? pi->mountpoint : NULL, pi ? !pi->newfs : TRUE, label_chunk_info[here].c->size);
safe_free(pi);
label_chunk_info[here].c->private_free = safe_free;
if (((cp = variable_get(DISK_LABELLED)) == NULL) || (strcmp(cp, "written")))
variable_set2(DISK_LABELLED, "yes");
PartInfo *pi = ((PartInfo *)label_chunk_info[here].c->private_data);
label_chunk_info[here].c->private_data =
new_part(pi ? pi->mountpoint : NULL, pi ? !pi->newfs : TRUE, label_chunk_info[here].c->size);
safe_free(pi);
label_chunk_info[here].c->private_free = safe_free;
if (((cp = variable_get(DISK_LABELLED)) == NULL) || (strcmp(cp, "written")))
variable_set2(DISK_LABELLED, "yes");
}
else
msg = MSG_NOT_APPLICABLE;

View File

@ -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.68 1997/02/22 14:11:50 peter Exp $
* $Id: label.c,v 1.69 1997/03/08 16:17:49 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -150,7 +150,8 @@ check_conflict(char *name)
int i;
for (i = 0; label_chunk_info[i].c; i++)
if (label_chunk_info[i].type == PART_FILESYSTEM && label_chunk_info[i].c->private_data
if ((label_chunk_info[i].type == PART_FILESYSTEM || label_chunk_info[i].type == PART_FAT)
&& label_chunk_info[i].c->private_data
&& !strcmp(((PartInfo *)label_chunk_info[i].c->private_data)->mountpoint, name))
return TRUE;
return FALSE;
@ -837,13 +838,13 @@ diskLabel(char *str)
case 'T': /* Toggle newfs state */
if (label_chunk_info[here].type == PART_FILESYSTEM) {
PartInfo *pi = ((PartInfo *)label_chunk_info[here].c->private_data);
label_chunk_info[here].c->private_data =
new_part(pi ? pi->mountpoint : NULL, pi ? !pi->newfs : TRUE, label_chunk_info[here].c->size);
safe_free(pi);
label_chunk_info[here].c->private_free = safe_free;
if (((cp = variable_get(DISK_LABELLED)) == NULL) || (strcmp(cp, "written")))
variable_set2(DISK_LABELLED, "yes");
PartInfo *pi = ((PartInfo *)label_chunk_info[here].c->private_data);
label_chunk_info[here].c->private_data =
new_part(pi ? pi->mountpoint : NULL, pi ? !pi->newfs : TRUE, label_chunk_info[here].c->size);
safe_free(pi);
label_chunk_info[here].c->private_free = safe_free;
if (((cp = variable_get(DISK_LABELLED)) == NULL) || (strcmp(cp, "written")))
variable_set2(DISK_LABELLED, "yes");
}
else
msg = MSG_NOT_APPLICABLE;

View File

@ -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.100 1997/03/08 12:57:41 jkh Exp $
* $Id: dist.c,v 1.101 1997/03/10 21:11:53 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -311,15 +311,15 @@ distMaybeSetPorts(dialogMenuItem *self)
{
dialog_clear_norefresh();
if (!msgYesNo("Would you like to install the FreeBSD ports collection?\n\n"
"This will give you ready access to over 800 ported software\n"
"packages, though at the cost of around 35MB of space when \"clean\"\n"
"and possibly much more than that if a lot of the distribution tarballs\n"
"are loaded (unless you have the 2nd CD from a FreeBSD CDROM distribution\n"
"available and can mount it on /cdrom, of course, in which case this is far\n"
"less of a problem).\n\n"
"This will give you ready access to over 800 ported software packages,\n"
"though at a cost of around 35MB of disk space when \"clean\" and possibly\n"
"much more than that if a lot of the distribution tarballs are loaded\n"
"(unless you have the 2nd CD from a FreeBSD CDROM distribution available\n"
"and can mount it on /cdrom, in which case this is far less of a problem).\n\n"
"The ports collection is a very valuable resource and, if you have at least\n"
"100MB to spare in your /usr partition, well worth having around.\n\n"
"For more information on the ports collection, see http://www.freebsd.org/ports\n"))
"For more information on the ports collection & the latest ports, visit:\n"
" http://www.freebsd.org/ports\n"))
Dists |= DIST_PORTS;
else
Dists &= ~DIST_PORTS;

View File

@ -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.68 1997/02/22 14:11:50 peter Exp $
* $Id: label.c,v 1.69 1997/03/08 16:17:49 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -150,7 +150,8 @@ check_conflict(char *name)
int i;
for (i = 0; label_chunk_info[i].c; i++)
if (label_chunk_info[i].type == PART_FILESYSTEM && label_chunk_info[i].c->private_data
if ((label_chunk_info[i].type == PART_FILESYSTEM || label_chunk_info[i].type == PART_FAT)
&& label_chunk_info[i].c->private_data
&& !strcmp(((PartInfo *)label_chunk_info[i].c->private_data)->mountpoint, name))
return TRUE;
return FALSE;
@ -837,13 +838,13 @@ diskLabel(char *str)
case 'T': /* Toggle newfs state */
if (label_chunk_info[here].type == PART_FILESYSTEM) {
PartInfo *pi = ((PartInfo *)label_chunk_info[here].c->private_data);
label_chunk_info[here].c->private_data =
new_part(pi ? pi->mountpoint : NULL, pi ? !pi->newfs : TRUE, label_chunk_info[here].c->size);
safe_free(pi);
label_chunk_info[here].c->private_free = safe_free;
if (((cp = variable_get(DISK_LABELLED)) == NULL) || (strcmp(cp, "written")))
variable_set2(DISK_LABELLED, "yes");
PartInfo *pi = ((PartInfo *)label_chunk_info[here].c->private_data);
label_chunk_info[here].c->private_data =
new_part(pi ? pi->mountpoint : NULL, pi ? !pi->newfs : TRUE, label_chunk_info[here].c->size);
safe_free(pi);
label_chunk_info[here].c->private_free = safe_free;
if (((cp = variable_get(DISK_LABELLED)) == NULL) || (strcmp(cp, "written")))
variable_set2(DISK_LABELLED, "yes");
}
else
msg = MSG_NOT_APPLICABLE;