From 7cdcc9fecda6db0604fa3fd839d8314c26eba2df Mon Sep 17 00:00:00 2001 From: Murray Stokely Date: Tue, 29 Jan 2002 22:35:40 +0000 Subject: [PATCH] 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/sade/label.c | 3 ++- usr.sbin/sysinstall/label.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c index a6b71b380a65..b9752d56113c 100644 --- a/usr.sbin/sade/label.c +++ b/usr.sbin/sade/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; diff --git a/usr.sbin/sysinstall/label.c b/usr.sbin/sysinstall/label.c index a6b71b380a65..b9752d56113c 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;