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.
This commit is contained in:
parent
4eff23dbe8
commit
cedbce4789
3
apm.c
3
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);
|
||||
|
3
bsd.c
3
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);
|
||||
|
3
ebr.c
3
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);
|
||||
|
3
gpt.c
3
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);
|
||||
|
3
mbr.c
3
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);
|
||||
|
3
pc98.c
3
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);
|
||||
|
1
scheme.h
1
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);
|
||||
|
Loading…
Reference in New Issue
Block a user