summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2014-03-25 02:32:04 +0000
committermarcel <marcel@FreeBSD.org>2014-03-25 02:32:04 +0000
commitcedbce478927358b7df8bda07b13d15f4c2d33d1 (patch)
treeb28d51a74d3538327ba3be4af62f670e45dc52b1
parent4eff23dbe8eafbf4a2986a11fcac141d206718c6 (diff)
downloadFreeBSD-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.c3
-rw-r--r--bsd.c3
-rw-r--r--ebr.c3
-rw-r--r--gpt.c3
-rw-r--r--mbr.c3
-rw-r--r--pc98.c3
-rw-r--r--scheme.h1
-rw-r--r--vtoc8.c3
8 files changed, 15 insertions, 7 deletions
diff --git a/apm.c b/apm.c
index 0eba10f..26646f9 100644
--- a/apm.c
+++ b/apm.c
@@ -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);
diff --git a/bsd.c b/bsd.c
index 6109d87..7607b0f 100644
--- a/bsd.c
+++ b/bsd.c
@@ -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);
diff --git a/ebr.c b/ebr.c
index 5a01605..ee42a41 100644
--- a/ebr.c
+++ b/ebr.c
@@ -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);
diff --git a/gpt.c b/gpt.c
index 637e0e1..e820473 100644
--- a/gpt.c
+++ b/gpt.c
@@ -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);
diff --git a/mbr.c b/mbr.c
index 6e6f547..275f3e9 100644
--- a/mbr.c
+++ b/mbr.c
@@ -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);
diff --git a/pc98.c b/pc98.c
index 5c6c53b..12311d9 100644
--- a/pc98.c
+++ b/pc98.c
@@ -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);
diff --git a/scheme.h b/scheme.h
index 6697caa..8f6c098 100644
--- a/scheme.h
+++ b/scheme.h
@@ -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);
diff --git a/vtoc8.c b/vtoc8.c
index 605563e..00be107 100644
--- a/vtoc8.c
+++ b/vtoc8.c
@@ -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);
OpenPOWER on IntegriCloud