From 80a5862e4638b3983879692876282ab4ceadd5ae Mon Sep 17 00:00:00 2001 From: murray Date: Tue, 29 Jan 2002 22:35:40 +0000 Subject: Fix a signal 11 error that occurs if you try to use the 'T' option on an existing FreeBSD partition. Reported by: Brent Cook --- usr.sbin/sysinstall/label.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.sbin/sysinstall') diff --git a/usr.sbin/sysinstall/label.c b/usr.sbin/sysinstall/label.c index a6b71b3..b9752d56 100644 --- a/usr.sbin/sysinstall/label.c +++ b/usr.sbin/sysinstall/label.c @@ -1034,7 +1034,8 @@ diskLabel(Device *dev) break; case 'T': /* Toggle newfs state */ - if (label_chunk_info[here].type == PART_FILESYSTEM) { + if ((label_chunk_info[here].type == PART_FILESYSTEM) && + (label_chunk_info[here].c->private_data)) { PartInfo *pi = ((PartInfo *)label_chunk_info[here].c->private_data); if (!pi->newfs) label_chunk_info[here].c->flags |= CHUNK_NEWFS; -- cgit v1.1