Date: Tue, 25 Mar 2014 02:32:04 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r263700 - user/marcel/mkimg Message-ID: <201403250232.s2P2W4Eh032390@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marcel Date: Tue Mar 25 02:32:04 2014 New Revision: 263700 URL: http://svnweb.freebsd.org/changeset/base/263700 Log: 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. Modified: user/marcel/mkimg/apm.c user/marcel/mkimg/bsd.c user/marcel/mkimg/ebr.c user/marcel/mkimg/gpt.c user/marcel/mkimg/mbr.c user/marcel/mkimg/pc98.c user/marcel/mkimg/scheme.h user/marcel/mkimg/vtoc8.c Modified: user/marcel/mkimg/apm.c ============================================================================== --- user/marcel/mkimg/apm.c Tue Mar 25 02:15:19 2014 (r263699) +++ user/marcel/mkimg/apm.c Tue Mar 25 02:32:04 2014 (r263700) @@ -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); Modified: user/marcel/mkimg/bsd.c ============================================================================== --- user/marcel/mkimg/bsd.c Tue Mar 25 02:15:19 2014 (r263699) +++ user/marcel/mkimg/bsd.c Tue Mar 25 02:32:04 2014 (r263700) @@ -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); Modified: user/marcel/mkimg/ebr.c ============================================================================== --- user/marcel/mkimg/ebr.c Tue Mar 25 02:15:19 2014 (r263699) +++ user/marcel/mkimg/ebr.c Tue Mar 25 02:32:04 2014 (r263700) @@ -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); Modified: user/marcel/mkimg/gpt.c ============================================================================== --- user/marcel/mkimg/gpt.c Tue Mar 25 02:15:19 2014 (r263699) +++ user/marcel/mkimg/gpt.c Tue Mar 25 02:32:04 2014 (r263700) @@ -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); Modified: user/marcel/mkimg/mbr.c ============================================================================== --- user/marcel/mkimg/mbr.c Tue Mar 25 02:15:19 2014 (r263699) +++ user/marcel/mkimg/mbr.c Tue Mar 25 02:32:04 2014 (r263700) @@ -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); Modified: user/marcel/mkimg/pc98.c ============================================================================== --- user/marcel/mkimg/pc98.c Tue Mar 25 02:15:19 2014 (r263699) +++ user/marcel/mkimg/pc98.c Tue Mar 25 02:32:04 2014 (r263700) @@ -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); Modified: user/marcel/mkimg/scheme.h ============================================================================== --- user/marcel/mkimg/scheme.h Tue Mar 25 02:15:19 2014 (r263699) +++ user/marcel/mkimg/scheme.h Tue Mar 25 02:32:04 2014 (r263700) @@ -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); Modified: user/marcel/mkimg/vtoc8.c ============================================================================== --- user/marcel/mkimg/vtoc8.c Tue Mar 25 02:15:19 2014 (r263699) +++ user/marcel/mkimg/vtoc8.c Tue Mar 25 02:32:04 2014 (r263700) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403250232.s2P2W4Eh032390>