diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2017-04-19 15:45:15 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2018-06-18 12:22:26 +0200 |
commit | 4e2d26611d93f522ce399b36f197dc959114b1ee (patch) | |
tree | 6726f6f98d9986deec83c51a7946e92296878aac | |
parent | c26ce774a7209012c0505ee841d54898c6665e20 (diff) |
Add manpage for lsmtd
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-rw-r--r-- | misc-utils/Makemodule.am | 4 | ||||
-rw-r--r-- | misc-utils/lsmtd.8 | 112 | ||||
-rw-r--r-- | misc-utils/lsmtd.c | 1 |
3 files changed, 117 insertions, 0 deletions
diff --git a/misc-utils/Makemodule.am b/misc-utils/Makemodule.am index 775925e..5e70f7c 100644 --- a/misc-utils/Makemodule.am +++ b/misc-utils/Makemodule.am @@ -53,7 +53,11 @@ MISC_HEADER = \ misc-utils/mcast_image.h \ misc-utils/lsmtd.h +MISC_MAN = \ + misc-utils/lsmtd.8 + EXTRA_DIST += $(MISC_HEADER) $(MISC_EXTRA) $(MISC_SH) +dist_man8_MANS += $(MISC_MAN) sbin_PROGRAMS += $(MISC_BINS) sbin_SCRIPTS += $(MISC_SH) diff --git a/misc-utils/lsmtd.8 b/misc-utils/lsmtd.8 new file mode 100644 index 0000000..3061c40 --- /dev/null +++ b/misc-utils/lsmtd.8 @@ -0,0 +1,112 @@ +.TH LSMTD 8 "April 2017" "mtd-utils" +.SH NAME +lsmtd \- list memory technology devices +.SH SYNOPSIS +.B lsmtd +[options] +.RI [ device ...] +.SH DESCRIPTION +.B lsmtd +lists information about all available or the specified MTD and UBI devices. +The +.B lsmtd +command reads the +.B sysfs +filesystem to gather information. Alternatively, the +.B procfs +filesystem and ioctl interfaces are used, should the sysfs filesytem not +be available. +.PP +The command prints all MTD and UBI devices in a pretty-printed list format by +default. +.PP +The default output is subject to change. So whenever possible, you should +avoid using default outputs in your scripts. Always explicitly define expected +columns by using +.B \-\-output +.I columns-list +in environments where a stable output is required. +.PP +Use +.B "lsmtd --help" +to get a list of all available columns. +.SH OPTIONS +.TP +.BR \-b , " \-\-bytes" +Print columns with size quantities (e.g. erase block size) in bytes instead +of a human-readable format. +.TP +.BR \-h , " \-\-help" +Display a help text and exit. +.TP +.BR \-i , " \-\-ascii" +Only use ascii characters for pretty printing. +.TP +.BR \-J , " \-\-json" +Use JSON output format. All potentially unsafe characters in string values are +escaped with JSON escape sequences or hex-escaped (\\u<code>). +.TP +.BR \-l , " \-\-list" +Use a pretty-printed list output format (default). +.TP +.BR \-m , " \-\-no-ubi" +Do not display information about UBI devices or volumes. +.TP +.BR \-n , " \-\-noheadings" +Do not print column headings when using raw or list output format. +.TP +.BR \-o , " \-\-output " \fIlist\fP +Specify which output columns to print. Use +.B \-\-help +to get a list of all supported columns. + +The default list of columns may be extended if \fIlist\fP is +specified in the format \fI+list\fP (e.g. \fBlsmtd -o +EB-SIZE\fP). +.TP +.BR \-O , " \-\-output\-all " +Output all available columns. +.TP +.BR \-P , " \-\-pairs" +Produce output in the form of key="value" pairs. +All potentially unsafe characters are hex-escaped (\\x<code>). +.TP +.BR \-r , " \-\-raw" +Produce output in raw format. All potentially unsafe characters are +hex-escaped (\\x<code>). +.TP +.BR \-u , " \-\-si\-units" +Display human readable sizes as powers of ten rather than powers of two. +.TP +.BR \-V , " \-\-version" +Print version information and exit. +.TP +.BR \-x , " \-\-sort " \fIcolumn\fP +Sort output lines by \fIcolumn\fP. +.SH NOTES +If the +.B \-\-bytes +option is not specified, the JSON output format prints sizes as string values +even if they do not have a suffix. +.SH AUTHORS +.nf +David Oberhollenzer <david.oberhollenzer@sigma-star.at> +.fi +.SH REPORTING BUGS +Report mtd-utils bugs to the Linux mtd mailing list. +.TP +Linux mtd mailing list: <linux-mtd@lists.infradead.org> +.TP +Linux mtd home page: <http://www.linux-mtd.infradead.org/> +.SH AVAILABILITY +The lsmtd command is part of the mtd-utils package and is available from +ftp://ftp.infradead.org/pub/mtd-utils/. +.SH COPYRIGHT +Copyright \(co 2017 David Oberhollenzer - sigma star gmbh +.br +License GPLv2: GNU GPL version 2 <http://gnu.org/licenses/gpl2.html>. +.br +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. +.SH SEE ALSO +.BR lsblk (8), +.BR ls (1) diff --git a/misc-utils/lsmtd.c b/misc-utils/lsmtd.c index 4b1de2c..24a30ac 100644 --- a/misc-utils/lsmtd.c +++ b/misc-utils/lsmtd.c @@ -128,6 +128,7 @@ static NORETURN void usage(int status) cols[i].desc); } + fputs("\nFor more details see "PROGRAM_NAME"(8).\n", stdout); exit(status); } |