diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-06-05 00:38:25 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-06-05 00:38:25 +0000 |
commit | 27424f98f99646fb8b3e4ef11652da62014a7ceb (patch) | |
tree | 47b5f078f236f633651ce1bad4b1228fac2f6d7d /sys/isofs/udf | |
parent | 91862e2af60dd7be0a8d86f5f3fe187dbb400d7f (diff) |
use six new macros to access & store the 48-bit disklabel fields related
to size. tested on almost all machines, double checked by miod and krw
next comes the type handling surrounding these values
Diffstat (limited to 'sys/isofs/udf')
-rw-r--r-- | sys/isofs/udf/udf_subr.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/isofs/udf/udf_subr.c b/sys/isofs/udf/udf_subr.c index 4943c8a0745..531c9697b1d 100644 --- a/sys/isofs/udf/udf_subr.c +++ b/sys/isofs/udf/udf_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udf_subr.c,v 1.11 2006/07/11 22:02:08 pedro Exp $ */ +/* $OpenBSD: udf_subr.c,v 1.12 2007/06/05 00:38:22 deraadt Exp $ */ /* * Copyright (c) 2006, Miodrag Vallat @@ -155,16 +155,16 @@ udf_disklabelspoof(dev_t dev, void (*strat)(struct buf *), strlcpy(lp->d_typename, vid, sizeof(lp->d_typename)); for (i = 0; i < MAXPARTITIONS; i++) { - lp->d_partitions[i].p_size = 0; - lp->d_partitions[i].p_offset = 0; + DL_SETPSIZE(&lp->d_partitions[i], 0); + DL_SETPOFFSET(&lp->d_partitions[i], 0); } /* * Fake two partitions, 'a' and 'c'. */ - lp->d_partitions[0].p_size = lp->d_secperunit; + DL_SETPSIZE(&lp->d_partitions[0], DL_GETDSIZE(lp)); lp->d_partitions[0].p_fstype = FS_UDF; - lp->d_partitions[RAW_PART].p_size = lp->d_secperunit; + DL_SETPSIZE(&lp->d_partitions[RAW_PART], DL_GETDSIZE(lp)); lp->d_partitions[RAW_PART].p_fstype = FS_UDF; lp->d_npartitions = RAW_PART + 1; |