Commit Graph

63 Commits

Author SHA1 Message Date
Sami Kerola 3ea54b843c
man: make tilde and caret characters to render correctly
As mentioned in 'Generating optimal glyphs' title in the manual page
mentioned in reference:

    Where a proper caret (^) that renders well in both a terminal and PDF is
    required, use "\(ha".

    Using a naked "~" character results in a poor rendering in PDF.  Instead
    use "\(ti".

Reference: https://man7.org/linux/man-pages/man7/man-pages.7.html#STYLE_GUIDE
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2020-11-14 15:22:34 +00:00
Michael Kerrisk (man-pages) 1538f6f636 Manual pages: wording fix: "another" ==> "other"
In several pages, there is a consistent wording problem: "another"
where "other" should be used. This wording problem can be
surprisingly confusing for native speakers, especially those
unaware that in some other languages, "another" and "other" can be
expressed with the same word.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
2020-05-29 14:31:47 +02:00
Michael Kerrisk (man-pages) ade04bb89c Manual pages: order AUTHORS / COPYRIGHT / SEE ALSO / AVAILABILITY consistently
There is value in ensuring that manual page sections use consistently
named sections, as far as possible, and also that sections have a
consistent order within manual pages. This is one of a series of patches
to place manual page sections in a consistent order.

In this patch, we ensure that the AUTHORS, COPYRIGHT, SEE ALSO, and
AVAILABILITY sections are always placed at the end of the page.

Testing that no gross editing mistake (causing accidental loss or addition
of text) was performed as follows:

    $ cat $(grep '\.SH' -l $(find . -name '*.[1-9]') |sort) | sort > a
    [Apply patch]
    $ cat $(grep '\.SH' -l $(find . -name '*.[1-9]') |sort) | sort > b
    $ diff a b
    $ echo $?
    0

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-22 10:25:49 +02:00
Michael Kerrisk (man-pages) a87f49f662 Manual pages: use the term "exit status"
The manual pages currently use a multitude of terms--"exit code",
"error code", "return code", "exit code", and so on--when what
is always meant is "exit status" (the POSIX term). This patch fixes
as many of these erroneous terms as I could find.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-20 12:56:52 +02:00
Michael Kerrisk (man-pages) 7e765c93dc Manual pages: Standardize on EXIT STATUS as section title
There is quite some value (in terms of readability and user
expectations) if consistent names are used for the sections
within manual pages. This patch is one of a series to bring
about this consistency.

Currently we have EXIT STATUS (18), EXIT CODES (3), RETURN CODE (7),
RETURN CODES (1), or RETURN VALUE (4 instances in pages that document
commands, rather than functions).

Let's standardize on the EXIT STATUS (which is also what is
suggested in man-pages(7), and is the POSIX terminology).

A subsequent patch will clean up corresponding miswordings in
manual page text.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-20 12:56:12 +02:00
Michael Kerrisk (man-pages) a8d0d330cf Manual pages: Standardize on AUTHORS as section title
There is quite some value (in terms of readability and user
expectations) if consistent names are used for the sections
within manual pages. This patch is one of a series to bring
about this consistency.

In the Linux man-pages project, I long ago did away with the
AUTHOR(S) section, but I realize some projects like to keep this.

But, let's make sure that the section is consistently titled
across pages. Currently we have AUTHOR (47) or AUTHORS (41).
Let's standardize on the latter (which is also what is
suggested in man-pages(7)).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-20 12:56:12 +02:00
Michael Kerrisk (man-pages) 5a82980632 docs: (man) remove double quotes (") in .SH lines
Using double quotes in .SH lines containing multiple words is unneeded,
and in any case is not consistently done in the util-linux manual pages,
where double quotes are used in only around half of the cases.
(This usage was long ago elminated in the man-pages project, with
no ill effects reported to date.)

Remove these quotes, so that .SH lines are more uniform, in preparation
for some (more easily) scripted doiscovery of consistency problems in
(and possibly global fixes to) the manual pages.

Other than stripping the double quotes, this patch makes no changes to
the content of the manual pages.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-19 12:15:34 +02:00
Bjarni Ingi Gislason 1c4c602427 man pages: Change a HYPHEN-MINUS (-) to a minus (\-) for options and numbers
Change a HYPHEN-MINUS (code 0x55, 2D) to a minus (\-), if in front of

1) a name of an option

2) a negative number to be printed.

  See man-pages(7) [Debian package "manpages"].

  The output from "nroff" is unchanged.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
2019-12-17 12:32:43 +01:00
Bjarni Ingi Gislason eb02489380 man pages: Add a comma after "e.g." and "i.e."
Add a comma (,) after "e.g." and "i.e.", or use English words
(man-pages(7) [package "manpages"]).

  Abbreviation points should be protected (usually with the
non-printing, zero width character '\&') from being interpreted as an
end of sentence, if they are not, and that independent of their current
place on the line.

  This is important when typing, as one does not usually know in
advance when the editor jumps to a new line.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
2019-12-17 12:32:43 +01:00
Elliott Mitchell 2bb3aa36b2 cleanup: Remove some spurious spaces
Sorry detail-oriented people tend to wipe these out if they notice them.
Add in automated tools and lots of excess end-of-line spaces get wiped
out.

Addresses: https://github.com/karelzak/util-linux/pull/849
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-10-01 13:01:43 +02:00
Karel Zak bce4a17b01 blkid: (man) add note about udev to --list-one
Addresses: https://github.com/karelzak/util-linux/issues/866
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-09-12 13:24:42 +02:00
Karel Zak 5bf5752e28 blkid: (man) cleanup return code section
Addresses: https://github.com/karelzak/util-linux/issues/764
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-11 12:02:31 +01:00
Karel Zak 969e8cbeb1 libblkid: improve whole-disk detection when read /proc/partitions
blkid(8) in high-level mode checks partitions and unpartitioned
whole-disk devices from the file /proc/partitions.

The current heuristic assumes that partition name ends with a digit.
Unfortunately, this is not correct -- for example md0 or nvme0n1 are
whole-disk devices.

This commit uses sysfs_devno_is_wholedisk() to make sure the device is
a partition (according to kernel or DM). It's probably more expensive,
because this way requires more syscalls (to read stuff from /sys etc.).

The patch also adds more information to the blkid(8) man page.

Addresses: https://github.com/karelzak/util-linux/issues/728
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-01-08 12:07:18 +01:00
Karel Zak 5e91d5dd71 blkid: make PART_ENTRY_* tags optional (add --no-part-details)
blkid(8) returns information from partition table also for empty
partitions. This is necessary for example for udev, but it could be
confusing if you care about on-device content only.

Default:
 # blkid -p /dev/md0p1; echo $?
 /dev/md0p1: PART_ENTRY_SCHEME="dos" PART_ENTRY_UUID="6d8796b1-01" PART_ENTRY_TYPE="0x83" PART_ENTRY_NUMBER="1" PART_ENTRY_OFFSET="2048" PART_ENTRY_SIZE="204800" PART_ENTRY_DISK="9:0"
 0

With --no-part-details:
 # blkid -p /dev/md0p1 --no-part-details; echo $?
 2

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1653413
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-11-29 13:21:36 +01:00
Karel Zak fc402b8b71 blkid: (man) add note about udev encoding
Addresses: https://github.com/karelzak/util-linux/issues/632
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-04-30 10:53:04 +02:00
Karel Zak beaca64a6c blkid: improve man page wording
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-10-16 23:26:45 +02:00
Karel Zak 27fbfef33c blkid: more info about ambivalent results to the man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-10-16 12:01:41 +02:00
Karel Zak 12786a9015 blkid: cleanup man page info about lsblk
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-10-16 11:45:41 +02:00
Sami Kerola 15a74f755a
blkid: add long options
This change attempts to make tab completion more reasonable by alloging
memorizable option names.  That also has positive impact to manual page, in
which referrals to other options are now easier to understand.

All short options are kept exactly as they were to avoid ABI breakage.  The
only exception is -f option that getopt(3) recognized, but was not found
from anywhere else.  The -f has been part of blkid since the initial commit.

Commit: 51410fc6de
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-05-02 23:22:04 +01:00
Sébastien Helleu d673b74e9d docs: replace FTP by HTTPS in kernel.org URLs
The links to ftp://ftp.kernel.org/ are replaced by
https://www.kernel.org/.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-12-19 11:22:26 +01:00
Michael Kerrisk (man-pages) f053ff1e3a Place SEE ALSO entries in order
This patch does only the following:

* Order SEE ALSO entries first by section name, then alphabetically
  within section
* Adds one or two missing commas in SEE ALSO lists
* Removes one or two periods that were (inconsistently) used
  at the end of SEE ALSO lists.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-29 10:44:19 +01:00
Karel Zak 5ec4a890a1 blkid: another hint to the man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-05-21 13:13:49 +02:00
Karel Zak f36522da5f blkid: be more precise in the man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-05-21 12:37:18 +02:00
Benno Schulenberg 3a60b1c26b docs: remove obsolete and unneeded comments from man-page files
Transform some of them into copyright lines.
Also fix three header lines and snip some trailing whitespace.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2015-01-12 11:03:26 +01:00
Karel Zak 89e90ae7b2 libblkid: care about unsafe chars in cache
The high-level libblkid API uses /run/blkid/blkid.tab cache to
store probing results. The cache format is

   <device NAME="value" ...>devname</device>

and unfortunately the cache code does not escape quotation marks:

   # mkfs.ext4 -L 'AAA"BBB'

   # cat /run/blkid/blkid.tab
   ...
   <device ... LABEL="AAA"BBB" ...>/dev/sdb1</device>

such string is later incorrectly parsed and blkid(8) returns
nonsenses. And for use-cases like

   # eval $(blkid -o export /dev/sdb1)

it's also insecure.

Note that mount, udevd and blkid -p are based on low-level libblkid
API, it bypass the cache and directly read data from the devices.

The current udevd upstream does not depend on blkid(8) output at all,
it's directly linked with the library and all unsafe chars are encoded by
\x<hex> notation.

   # mkfs.ext4 -L 'X"`/tmp/foo` "' /dev/sdb1
   # udevadm info --export-db | grep LABEL
   ...
   E: ID_FS_LABEL=X__/tmp/foo___
   E: ID_FS_LABEL_ENC=X\x22\x60\x2ftmp\x2ffoo\x60\x20\x22

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-11-27 13:39:35 +01:00
Karel Zak 9b825f8194 blkid: add hint about lsblk to the man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-11-19 14:43:38 +01:00
Karel Zak 68e422ecae docs: update info about env debug variables
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-11-03 13:13:54 +01:00
Mike Frysinger 66083665d5 standard SEE ALSO section of man pages
The standard format is to seperate each entry with a comma, and
for each one to be on a line by itself.  Most util-linux pages
follow this, but a few do not.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-05-13 14:42:59 +02:00
Benno Schulenberg 9c91fc03ae docs: make the section AVAILABILITY always come last in man pages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-03-20 14:09:24 +01:00
Benno Schulenberg a9b2c52f77 blkid: also accept -V for displaying version information
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-03-20 14:08:03 +01:00
Benno Schulenberg bc88ad1a5f docs: improve wording and formatting of blkid man page
Furthermore, explain the device argument right at the beginning,
since it is not an option, and alphabetize -k.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-03-20 14:08:03 +01:00
Karel Zak 16ef36f783 docs: add TB to list of supported suffixes
Reported-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-18 18:31:07 +01:00
Karel Zak 6a0766444d libblkid: remove optimization from verify( funrtion
Now libblkid (the cache based part) tries to probe for the cached
filesystem firstly. This optimization is broken, because:

  * new another superblock could be on the device and the original
    is already obsolete
  * we still need to probe for partitions and raids
  * the code was too fragile

The patch also suggests lsblk --fs in blkid.8 for end users. lsblk
read information from used db.

Reported-by: Andreas Hofmeister <andi@collax.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-02-01 15:59:58 +01:00
Karel Zak 8627d0159b blkid: fix man page mess
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-12-10 12:25:25 +01:00
Mike Frysinger 8323d9fd59 fix bold style of man page references
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-10-09 12:12:48 +02:00
Gilles Espinasse 45683be543 textual: typo fixes
Signed-off-by: Gilles Espinasse <g.esp@free.fr>
2012-10-02 10:24:26 +02:00
Davidlohr Bueso ddfeda98d8 blkid: document LIBBLKID_DEBUG users
Update the manpages of programs that use this environment variable for
extra debugging information.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2012-09-04 17:21:54 +02:00
Bernhard Voelker 455fe9a075 Fix typos found by misspellings
The tool misspellings (https://github.com/lyda/misspell-check)
detected several typos. Command used:

  $ git ls-files | grep -v ^po/ | misspellings -f -

* isosize: Fix typo in usage string.
* configure.ac: Fix typo in help string of --enable-most-builds option.
* fdisk: Fix typo in man page.
* libblkid, blkid, mount: Likewise.
* Fix various typos in docs and in source code comments.

Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
2012-04-23 13:16:35 +02:00
Karel Zak 10b4d34dc0 blkid: add docs about PARTUUID= and PARTLABEL=
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-04-19 14:34:29 +02:00
Bernhard Voelker d636d6d82a docs: clarify KiB vs. KB in man pages
Update the man pages of blkid, wipefs, fallocate, fstrim, losetup
and hexdump to clarify the suffixes for the numerical values of the
offset and size/length arguments regarding KiB=1024 vs KB=1000.
Also mention the ZiB/YiB and ZB/YB suffixes supported by strtosize().

Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
2012-03-30 15:23:32 +02:00
Karel Zak fab66da531 blkid: add note about variable tags and devices order.
Reported-by: Michael Conrad <mconrad@intellitree.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-29 15:09:54 +02:00
Karel Zak 24d741d88a docs: mark udev and list blkid(8) output formats deprecated
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-26 13:09:27 +02:00
Karel Zak b82590ad46 blkid: move cache to /run on new systems
Why?

 * read-only root

 * /etc is pretty bad place for caches

 * all is usually cached by udev in /dev/disk/by-* and libblkid
   is able to use these symlinks

 * boot persistent cache is attractive for very small subset of
   Linux machines (and they already need extra udev tunning otherwise
   udev will probe all block devices during boot)

 * the default is possible to override in /etc/blkid.conf

The systems without /run directory will not be affected by this
change.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-25 13:20:37 +01:00
Karel Zak 077b15dcaa blkid: remove -w option from man page and usage() output
The option does not have any effect, the original functionality was
removed from e2fsprogs in year 2003 by

 commit	50b380b4d4ab668bad45033e3a8aaf93c7f42844
 git://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git

So.. don't propagate the option to users in year 2012 :-)

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-25 12:34:02 +01:00
Dave Reisner 4103720894 blkid: fix unfinished sentence for -l option in blkid.8
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-27 15:10:22 +02:00
Benno Schulenberg 232dc924c4 docs: uniformize the header and footer lines in man pages
Use dates without the day, use the full month name, put "util-linux" in
the lower left corner, and "User Commands" or "System Administration"
at the top center.

Also improve here and there the one-line program description.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2011-08-22 10:39:21 +02:00
Karel Zak 70db6c7ef4 blkid: list all known filesystems/RAIDs (add -k option)
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-06-20 16:42:03 +02:00
Karel Zak 36a74e1b45 blkid: add -d option to print non-printable chars
Reported-by: laborer2008 laborer <laborer2008@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-03-29 11:44:29 +02:00
Benno Schulenberg 0791a058fa textual: tweak several manpages, mainly the blkid one
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2011-03-08 13:14:53 +01:00
Karel Zak 68c88d942f blkid: add new return code 8 for ambivalent low-level probing result
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-03 12:59:58 +01:00