Commit Graph

42 Commits

Author SHA1 Message Date
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
Karel Zak c38b4ebb0e blkid: add note about PART_ENTRY_ tags to blkid.8
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-03 12:34:34 +01:00
Karel Zak 601d12fb10 rename util-linux-ng back to util-linux
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-30 11:41:59 +01:00
Karel Zak 76f47165b0 blkid: remove duplicate option from man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-05-21 15:56:44 +02:00
Karel Zak ab978962b1 blkid: add 'export' output format
This output format is similar to 'udev' but without udev specific
prefixed (e.g. ID_FS_*). The 'export' format is automatically enabled
for I/O Limits (-i).

Signed-off-by: Karel Zak <kzak@redhat.com>
2010-05-14 12:02:57 +02:00
Karel Zak 0979291016 blkid: add -i option to print I/O limits
blkid -i /dev/sdb /dev/sda
/dev/sdb: MINIMUM_IO_SIZE="512" OPTIMAL_IO_SIZE="32768" PHYSICAL_SECTOR_SIZE="512" LOGICAL_SECTOR_SIZE="512"
/dev/sda: MINIMUM_IO_SIZE="512" PHYSICAL_SECTOR_SIZE="512" LOGICAL_SECTOR_SIZE="512"

Signed-off-by: Karel Zak <kzak@redhat.com>
2010-05-13 23:27:22 +02:00
Karel Zak 25636f8263 blkid: update man page/usage()
The "-s <tag>" options is usable for low-level probing more too. This
feature should be documented.

Signed-off-by: Karel Zak <kzak@redhat.com>
2010-05-13 20:42:28 +02:00
Karel Zak 8ab912cfa6 blkid: support suffixes for -O <offset> and -S <size>
for example:  blkid -p -O 17816085KiB /dev/sda

Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-30 14:42:42 +02:00
Karel Zak 8ab43e6a67 blkid: cleanup man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-23 14:24:02 +01:00
Karel Zak 4f946f530c blkid: add -n <list> option
This option allows to restrict low-level probing to the defined list
of superbocks (filesystems or RAIDs). For example:

	blkid -p -n ext3,ext4,vfat /dev/sda1
or
	blkid -p -n novfat /dev/sda1

Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-23 14:06:54 +01:00
Karel Zak 2d71a92941 blkid: add pretty output, document -L incompatibility with e2fsprogs
... sad story, I have temporary disabled pretty-output code
in very early version of blkid.c in u-l-ng. (It was also in
time when pretty-output was very new feature in e2fsprogs.)

Unfortunately, the -L option (shortcut to "-o list") in u-l-ng version
was reused for for any other functionality few months later.... this
stupid thing was released in u-l-ng 2.15 and 2.16 without any negative
feedback from users.

It means the blkid from u-l-ng is not backwardly compatible with
the original version from e2fsprogs. The -L option has a different
meaning there.

I'm sorry about this bug...

This patch:

  * enable pretty-output (-o line)
  * add a note about incompatibility between u-l-ng and e2fsprogs
    to blkid.8 man page

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-14 02:51:30 +02:00
Karel Zak c49057d261 wipefs: new command
# ./wipefs /dev/sda4
 offset               type
 ----------------------------------------------------------------
 0xff6                swap   [other]
                      UUID:  da6c54ea-77d9-470a-82f1-e793fd5d9131

 0x36                 vfat   [filesystem]
                      UUID:  497F-3013

 # ./wipefs --offset 0x36 /dev/sda4
 8 bytes [46 41 54 31 32 20 20 20] erased at offset 0x36 (vfat)

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-06 23:56:23 +02:00
Karel Zak 7711e2150b blkid: allow to use -s <TAG> for low-level probing (-p mode)
# blkid -p -s TYPE /dev/sda3
 /dev/sda3: TYPE="swap"

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-09-24 14:44:47 +02:00
Karel Zak 5663298c2c blkid: move to misc-utils/ directory
The others utilities are in one of the top-level directories. That's
confusing to have blkid(8) and findfs(8) in shlibs/ tree.

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-07-02 14:38:23 +02:00