Page MenuHomeFreeBSD

mkimg: Add maximum capacity option
ClosedPublic

Authored by manu on Apr 26 2017, 1:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 18 2024, 4:02 AM
Unknown Object (File)
Jan 16 2024, 9:14 PM
Unknown Object (File)
Jan 12 2024, 10:06 AM
Unknown Object (File)
Dec 20 2023, 3:27 AM
Unknown Object (File)
Nov 27 2023, 2:18 PM
Unknown Object (File)
Nov 15 2023, 2:52 AM
Unknown Object (File)
Nov 8 2023, 1:55 PM
Unknown Object (File)
Nov 7 2023, 4:01 PM
Subscribers

Details

Summary

mkimg: Add -C argument to specify maximum capacity

Add a -C option to specify a maximum capacity for the final image file.
It is useful to control the size of the generated image for sdcard or
when we will add dynamic size partition.

Sponsored By: Gandi.net

Test Plan

Create a bunch of image with different size etc ...

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

wblock added inline comments.
usr.bin/mkimg/mkimg.1
40 ↗(On Diff #27751)

The space in "minimum capacity" makes it look like two arguments are expected. Maybe minimum_capacity or min_capacity instead? Likewise for "maximum capacity".

131 ↗(On Diff #27751)

Passive -> active:
s/can be/is/

132 ↗(On Diff #27751)

This is unclear, mostly due to "it" being nonspecific. Also has some passive stuff, so an attempted rewrite:

If the combined sizes of the given partitions exceed the size given with
.Fl C ,
image creation fails.
137 ↗(On Diff #27751)

s/short hand/shorthand/

Update manpage to address wblock@ comments.

manu marked 4 inline comments as done.Apr 28 2017, 3:32 PM
usr.bin/mkimg/mkimg.c
391 ↗(On Diff #27823)

This should be greater-than (>) instead of greater-equal (>=), don't you think?

end block can be equal to the max capacity

manu marked an inline comment as done.May 2 2017, 9:09 AM
This revision is now accepted and ready to land.May 2 2017, 6:29 PM
usr.bin/mkimg/mkimg.1
131 ↗(On Diff #27911)

Whoops, didn't see the obvious change:

option specifies a maximum capacity for the disk image.
This revision was automatically updated to reflect the committed changes.