Update the usage message and the man page to account for the new long
options. Bump the version number to 20140927. While here, use explicit fputc() calls to skip a line in the output. This to avoid having to hunt for extra '\n' characters in the printf format strings. MFC after: 1 week Relnotes: yes
This commit is contained in:
parent
4490a86891
commit
fb2f6c6c66
@ -6,7 +6,7 @@ PROG= mkimg
|
|||||||
SRCS= format.c image.c mkimg.c scheme.c
|
SRCS= format.c image.c mkimg.c scheme.c
|
||||||
MAN= mkimg.1
|
MAN= mkimg.1
|
||||||
|
|
||||||
MKIMG_VERSION=20140926
|
MKIMG_VERSION=20140927
|
||||||
CFLAGS+=-DMKIMG_VERSION=${MKIMG_VERSION}
|
CFLAGS+=-DMKIMG_VERSION=${MKIMG_VERSION}
|
||||||
CFLAGS+=-DSPARSE_WRITE
|
CFLAGS+=-DSPARSE_WRITE
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd September 12, 2014
|
.Dd September 27, 2014
|
||||||
.Dt MKIMG 1
|
.Dt MKIMG 1
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -44,6 +44,8 @@
|
|||||||
.Fl s Ar scheme
|
.Fl s Ar scheme
|
||||||
.Fl p Ar partition
|
.Fl p Ar partition
|
||||||
.Op Fl p Ar partition ...
|
.Op Fl p Ar partition ...
|
||||||
|
.Nm
|
||||||
|
.Ar --formats | --schemes | --version
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
The
|
The
|
||||||
.Nm
|
.Nm
|
||||||
@ -122,10 +124,32 @@ utility will generate predictable values for Universally Unique Identifiers
|
|||||||
.Nm
|
.Nm
|
||||||
utility will create images that are identical.
|
utility will create images that are identical.
|
||||||
.Pp
|
.Pp
|
||||||
For a complete list of supported partitioning schemes or supported output
|
A set of long options exist to query about the
|
||||||
format, or for a detailed description of how to specify partitions, run the
|
.Nm
|
||||||
|
utilty itself.
|
||||||
|
Options in this set should be given by themselves because the
|
||||||
|
.Nm
|
||||||
|
utility exits immediately after providing the requested information.
|
||||||
|
The version of the
|
||||||
|
.Nm
|
||||||
|
utility is printed when the
|
||||||
|
.Ar --version
|
||||||
|
option is given.
|
||||||
|
The list of supported output formats is printed when the
|
||||||
|
.Ar --formats
|
||||||
|
option is given and the list of supported partitioning schemes is printed
|
||||||
|
when the
|
||||||
|
.Ar --schemes
|
||||||
|
option is given.
|
||||||
|
Both the format and scheme lists a space-separated lists for easy handling
|
||||||
|
in scripts.
|
||||||
|
.Pp
|
||||||
|
For a more descriptive list of supported partitioning schemes or supported
|
||||||
|
output format, or for a detailed description of how to specify partitions,
|
||||||
|
run the
|
||||||
.Nm
|
.Nm
|
||||||
utility without any arguments.
|
utility without any arguments.
|
||||||
|
This will print a usage message with all the necessary details.
|
||||||
.Sh ENVIRONMENT
|
.Sh ENVIRONMENT
|
||||||
.Bl -tag -width "TMPDIR" -compact
|
.Bl -tag -width "TMPDIR" -compact
|
||||||
.It Ev TMPDIR
|
.It Ev TMPDIR
|
||||||
|
@ -79,7 +79,7 @@ print_formats(int usage)
|
|||||||
const char *sep;
|
const char *sep;
|
||||||
|
|
||||||
if (usage) {
|
if (usage) {
|
||||||
fprintf(stderr, "\n formats:\n");
|
fprintf(stderr, " formats:\n");
|
||||||
SET_FOREACH(f_iter, formats) {
|
SET_FOREACH(f_iter, formats) {
|
||||||
f = *f_iter;
|
f = *f_iter;
|
||||||
fprintf(stderr, "\t%s\t- %s\n", f->name,
|
fprintf(stderr, "\t%s\t- %s\n", f->name,
|
||||||
@ -103,7 +103,7 @@ print_schemes(int usage)
|
|||||||
const char *sep;
|
const char *sep;
|
||||||
|
|
||||||
if (usage) {
|
if (usage) {
|
||||||
fprintf(stderr, "\n schemes:\n");
|
fprintf(stderr, " schemes:\n");
|
||||||
SET_FOREACH(s_iter, schemes) {
|
SET_FOREACH(s_iter, schemes) {
|
||||||
s = *s_iter;
|
s = *s_iter;
|
||||||
fprintf(stderr, "\t%s\t- %s\n", s->name,
|
fprintf(stderr, "\t%s\t- %s\n", s->name,
|
||||||
@ -138,9 +138,14 @@ usage(const char *why)
|
|||||||
{
|
{
|
||||||
|
|
||||||
warnx("error: %s", why);
|
warnx("error: %s", why);
|
||||||
fprintf(stderr, "\nusage: %s <options>\n", getprogname());
|
fputc('\n', stderr);
|
||||||
|
fprintf(stderr, "usage: %s <options>\n", getprogname());
|
||||||
|
|
||||||
fprintf(stderr, " options:\n");
|
fprintf(stderr, " options:\n");
|
||||||
|
fprintf(stderr, "\t--formats\t- list image formats\n");
|
||||||
|
fprintf(stderr, "\t--schemes\t- list partition schemes\n");
|
||||||
|
fprintf(stderr, "\t--version\t- show version information\n");
|
||||||
|
fputc('\n', stderr);
|
||||||
fprintf(stderr, "\t-b <file>\t- file containing boot code\n");
|
fprintf(stderr, "\t-b <file>\t- file containing boot code\n");
|
||||||
fprintf(stderr, "\t-f <format>\n");
|
fprintf(stderr, "\t-f <format>\n");
|
||||||
fprintf(stderr, "\t-o <file>\t- file to write image into\n");
|
fprintf(stderr, "\t-o <file>\t- file to write image into\n");
|
||||||
@ -152,11 +157,12 @@ usage(const char *why)
|
|||||||
fprintf(stderr, "\t-P <num>\t- physical sector size\n");
|
fprintf(stderr, "\t-P <num>\t- physical sector size\n");
|
||||||
fprintf(stderr, "\t-S <num>\t- logical sector size\n");
|
fprintf(stderr, "\t-S <num>\t- logical sector size\n");
|
||||||
fprintf(stderr, "\t-T <num>\t- number of tracks to simulate\n");
|
fprintf(stderr, "\t-T <num>\t- number of tracks to simulate\n");
|
||||||
|
fputc('\n', stderr);
|
||||||
print_formats(1);
|
print_formats(1);
|
||||||
|
fputc('\n', stderr);
|
||||||
print_schemes(1);
|
print_schemes(1);
|
||||||
|
fputc('\n', stderr);
|
||||||
fprintf(stderr, "\n partition specification:\n");
|
fprintf(stderr, " partition specification:\n");
|
||||||
fprintf(stderr, "\t<t>[/<l>]::<size>\t- empty partition of given "
|
fprintf(stderr, "\t<t>[/<l>]::<size>\t- empty partition of given "
|
||||||
"size\n");
|
"size\n");
|
||||||
fprintf(stderr, "\t<t>[/<l>]:=<file>\t- partition content and size "
|
fprintf(stderr, "\t<t>[/<l>]:=<file>\t- partition content and size "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user