diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2013-11-05 00:51:59 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2013-11-05 00:51:59 +0000 |
commit | 796d477c0b5f03d8d84b1697382465b7555e5c98 (patch) | |
tree | 0522f4b0c219b74af4f5e76a0fc813a809442abc /sbin/newfs_msdos | |
parent | 1de8989a1b132480cf21105d5617b5ca6325daa0 (diff) |
Replace direct references to p_size, p_offset and d_secperunit with
DL_[GET|SET]PSIZE(), DL_[GET|SET]POFFSET(), DL_[GET|SET]DSIZE() in
order to get|set correct value that includes the high bits of the
value.
Diffstat (limited to 'sbin/newfs_msdos')
-rw-r--r-- | sbin/newfs_msdos/newfs_msdos.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/newfs_msdos/newfs_msdos.c b/sbin/newfs_msdos/newfs_msdos.c index c8a4731c76c..a876ec7835a 100644 --- a/sbin/newfs_msdos/newfs_msdos.c +++ b/sbin/newfs_msdos/newfs_msdos.c @@ -1,4 +1,4 @@ -/* $OpenBSD: newfs_msdos.c,v 1.20 2010/05/18 04:41:14 dlg Exp $ */ +/* $OpenBSD: newfs_msdos.c,v 1.21 2013/11/05 00:51:58 krw Exp $ */ /* * Copyright (c) 1998 Robert Nordier @@ -740,12 +740,12 @@ getdiskinfo(int fd, const char *fname, const char *dtype, int oflag, if (part == -1) part = RAW_PART; if (part >= lp->d_npartitions || - !lp->d_partitions[part].p_size) + !DL_GETPSIZE(&lp->d_partitions[part])) errx(1, "%s: partition is unavailable", fname); if (!oflag && part != -1) - bpb->hid += lp->d_partitions[part].p_offset; + bpb->hid += DL_GETPOFFSET(&lp->d_partitions[part]); if (!bpb->bsec) - bpb->bsec = lp->d_partitions[part].p_size; + bpb->bsec = DL_GETPSIZE(&lp->d_partitions[part]); if (!bpb->bps) bpb->bps = ckgeom(fname, lp->d_secsize, "bytes/sector"); if (!bpb->spt) |