diff options
author | marcel <marcel@FreeBSD.org> | 2014-03-25 02:32:04 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2014-03-25 02:32:04 +0000 |
commit | cedbce478927358b7df8bda07b13d15f4c2d33d1 (patch) | |
tree | b28d51a74d3538327ba3be4af62f670e45dc52b1 | |
parent | 4eff23dbe8eafbf4a2986a11fcac141d206718c6 (diff) | |
download | FreeBSD-src-cedbce478927358b7df8bda07b13d15f4c2d33d1.zip FreeBSD-src-cedbce478927358b7df8bda07b13d15f4c2d33d1.tar.gz |
Allow schemes to specify a maximum sector size. The minimum is fixed
at 512. This allows checking of the sector size up-front when given
on the command line.
-rw-r--r-- | apm.c | 3 | ||||
-rw-r--r-- | bsd.c | 3 | ||||
-rw-r--r-- | ebr.c | 3 | ||||
-rw-r--r-- | gpt.c | 3 | ||||
-rw-r--r-- | mbr.c | 3 | ||||
-rw-r--r-- | pc98.c | 3 | ||||
-rw-r--r-- | scheme.h | 1 | ||||
-rw-r--r-- | vtoc8.c | 3 |
8 files changed, 15 insertions, 7 deletions
@@ -112,7 +112,8 @@ static struct mkimg_scheme apm_scheme = { .metadata = apm_metadata, .write = apm_write, .nparts = 4096, - .labellen = APM_ENT_NAMELEN - 1 + .labellen = APM_ENT_NAMELEN - 1, + .maxsecsz = 4096 }; SCHEME_DEFINE(apm_scheme); @@ -117,7 +117,8 @@ static struct mkimg_scheme bsd_scheme = { .metadata = bsd_metadata, .write = bsd_write, .nparts = 20, - .bootcode = BBSIZE + .bootcode = BBSIZE, + .maxsecsz = 512 }; SCHEME_DEFINE(bsd_scheme); @@ -122,7 +122,8 @@ static struct mkimg_scheme ebr_scheme = { .aliases = ebr_aliases, .metadata = ebr_metadata, .write = ebr_write, - .nparts = 4096 + .nparts = 4096, + .maxsecsz = 4096 }; SCHEME_DEFINE(ebr_scheme); @@ -296,7 +296,8 @@ static struct mkimg_scheme gpt_scheme = { .write = gpt_write, .nparts = 4096, .labellen = 36, - .bootcode = 512 + .bootcode = 512, + .maxsecsz = 4096 }; SCHEME_DEFINE(gpt_scheme); @@ -97,7 +97,8 @@ static struct mkimg_scheme mbr_scheme = { .metadata = mbr_metadata, .write = mbr_write, .bootcode = 512, - .nparts = NDOSPART + .nparts = NDOSPART, + .maxsecsz = 4096 }; SCHEME_DEFINE(mbr_scheme); @@ -110,7 +110,8 @@ static struct mkimg_scheme pc98_scheme = { .write = pc98_write, .bootcode = PC98_BOOTCODESZ, .labellen = 16, - .nparts = PC98_NPARTS + .nparts = PC98_NPARTS, + .maxsecsz = 512 }; SCHEME_DEFINE(pc98_scheme); @@ -71,6 +71,7 @@ struct mkimg_scheme { u_int nparts; u_int labellen; u_int bootcode; + u_int maxsecsz; }; SET_DECLARE(schemes, struct mkimg_scheme); @@ -99,7 +99,8 @@ static struct mkimg_scheme vtoc8_scheme = { .aliases = vtoc8_aliases, .metadata = vtoc8_metadata, .write = vtoc8_write, - .nparts = VTOC8_NPARTS + .nparts = VTOC8_NPARTS, + .maxsecsz = 512 }; SCHEME_DEFINE(vtoc8_scheme); |