summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade
diff options
context:
space:
mode:
authormurray <murray@FreeBSD.org>2002-01-29 22:35:40 +0000
committermurray <murray@FreeBSD.org>2002-01-29 22:35:40 +0000
commit80a5862e4638b3983879692876282ab4ceadd5ae (patch)
tree5f05f36e361bb0ec723462888995f32b356a6c67 /usr.sbin/sade
parentf6d55d0aac6caa00661eb68bbbee15a5abff984b (diff)
downloadFreeBSD-src-80a5862e4638b3983879692876282ab4ceadd5ae.zip
FreeBSD-src-80a5862e4638b3983879692876282ab4ceadd5ae.tar.gz
Fix a signal 11 error that occurs if you try to use the 'T' option on
an existing FreeBSD partition. Reported by: Brent Cook <busterb@mail.utexas.edu>
Diffstat (limited to 'usr.sbin/sade')
-rw-r--r--usr.sbin/sade/label.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c
index a6b71b3..b9752d56 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;
OpenPOWER on IntegriCloud