summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade/label.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1997-03-11 17:51:01 +0000
committerjkh <jkh@FreeBSD.org>1997-03-11 17:51:01 +0000
commit170b842387b3516ef454d216f56a23422a2ffd43 (patch)
tree0ccdc05f8eecd34d09fc13adad0ca00ffc6243d1 /usr.sbin/sade/label.c
parent4f07d6ce625a97531c8982938b64c561f5773a51 (diff)
downloadFreeBSD-src-170b842387b3516ef454d216f56a23422a2ffd43.zip
FreeBSD-src-170b842387b3516ef454d216f56a23422a2ffd43.tar.gz
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.
Diffstat (limited to 'usr.sbin/sade/label.c')
-rw-r--r--usr.sbin/sade/label.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c
index 6449cd8..c57abf1 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.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;
OpenPOWER on IntegriCloud