summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sbin/bsdlabel/bsdlabel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c
index 7be9db2..2dcffd0 100644
--- a/sbin/bsdlabel/bsdlabel.c
+++ b/sbin/bsdlabel/bsdlabel.c
@@ -400,7 +400,7 @@ writelabel(void)
for (i = 0; i < lab.d_npartitions; i++)
if (lab.d_partitions[i].p_size)
lab.d_partitions[i].p_offset += lba_offset;
- bsd_disklabel_le_enc(bootarea + labeloffset + labelsoffset * secsize,
+ bsd_disklabel_le_enc(bootarea + labeloffset + labelsoffset * lab.d_secsize,
lp);
fd = open(specname, O_RDWR);
@@ -434,7 +434,7 @@ writelabel(void)
gctl_ro_param(grq, "class", -1, "BSD");
gctl_ro_param(grq, "geom", -1, pname);
gctl_ro_param(grq, "label", 148+16*8,
- bootarea + labeloffset + labelsoffset * secsize);
+ bootarea + labeloffset + labelsoffset * lab.d_secsize);
errstr = gctl_issue(grq);
if (errstr != NULL) {
warnx("%s", errstr);
OpenPOWER on IntegriCloud