diff options
author | marcel <marcel@FreeBSD.org> | 2014-09-23 16:05:23 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2014-09-23 16:05:23 +0000 |
commit | 0eb256ebfd6ec7a8d152bc026d9c3c9b4ba98a8e (patch) | |
tree | f0239b9f2c740e07f234bd5513b12512b8429249 /usr.bin/mkimg/apm.c | |
parent | 26cc830ced9db561629daa6804f53a0cc6548c0d (diff) | |
download | FreeBSD-src-0eb256ebfd6ec7a8d152bc026d9c3c9b4ba98a8e.zip FreeBSD-src-0eb256ebfd6ec7a8d152bc026d9c3c9b4ba98a8e.tar.gz |
MFC 271881: Fix partition alignment and image rounding when any of
-P (block size), -T (track size) or -H (number of heads) is given.
Approved by: re@ (gjb)
Diffstat (limited to 'usr.bin/mkimg/apm.c')
-rw-r--r-- | usr.bin/mkimg/apm.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.bin/mkimg/apm.c b/usr.bin/mkimg/apm.c index 12add8e..de92cc0 100644 --- a/usr.bin/mkimg/apm.c +++ b/usr.bin/mkimg/apm.c @@ -57,13 +57,12 @@ static struct mkimg_alias apm_aliases[] = { { ALIAS_NONE, 0 } }; -static u_int -apm_metadata(u_int where) +static lba_t +apm_metadata(u_int where, lba_t blk) { - u_int secs; - secs = (where == SCHEME_META_IMG_START) ? nparts + 2 : 0; - return (secs); + blk += (where == SCHEME_META_IMG_START) ? nparts + 2 : 0; + return (round_block(blk)); } static int |