summaryrefslogtreecommitdiffstats
path: root/misc-utils/blkid.8
Commit message (Collapse)AuthorAgeFilesLines
* blkid: (man) cleanup return code sectionKarel Zak2019-03-111-1/+2
| | | | | Addresses: https://github.com/karelzak/util-linux/issues/764 Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: improve whole-disk detection when read /proc/partitionsKarel Zak2019-01-081-1/+1
| | | | | | | | | | | | | | | | | | 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>
* blkid: make PART_ENTRY_* tags optional (add --no-part-details)Karel Zak2018-11-291-1/+5
| | | | | | | | | | | | | | | | | | 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>
* blkid: (man) add note about udev encodingKarel Zak2018-04-301-2/+7
| | | | | Addresses: https://github.com/karelzak/util-linux/issues/632 Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: improve man page wordingKarel Zak2017-10-161-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: more info about ambivalent results to the man pageKarel Zak2017-10-161-0/+10
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: cleanup man page info about lsblkKarel Zak2017-10-161-15/+15
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: add long optionsSami Kerola2017-05-031-65/+62Star
| | | | | | | | | | | | | 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: 51410fc6deb29cae54a2669aafabae6c49f964fc Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: replace FTP by HTTPS in kernel.org URLsSébastien Helleu2016-12-191-1/+1
| | | | | | | The links to ftp://ftp.kernel.org/ are replaced by https://www.kernel.org/. Signed-off-by: Karel Zak <kzak@redhat.com>
* Place SEE ALSO entries in orderMichael Kerrisk (man-pages)2016-11-291-1/+1
| | | | | | | | | | | | 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>
* blkid: another hint to the man pageKarel Zak2015-05-211-2/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: be more precise in the man pageKarel Zak2015-05-211-5/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: remove obsolete and unneeded comments from man-page filesBenno Schulenberg2015-01-121-4/+0Star
| | | | | | | 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>
* libblkid: care about unsafe chars in cacheKarel Zak2014-11-271-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* blkid: add hint about lsblk to the man pageKarel Zak2014-11-191-1/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: update info about env debug variablesKarel Zak2014-11-031-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* standard SEE ALSO section of man pagesMike Frysinger2013-05-131-2/+2
| | | | | | | | 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>
* docs: make the section AVAILABILITY always come last in man pagesBenno Schulenberg2013-03-201-4/+4
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* blkid: also accept -V for displaying version informationBenno Schulenberg2013-03-201-1/+1
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: improve wording and formatting of blkid man pageBenno Schulenberg2013-03-201-70/+67Star
| | | | | | | 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>
* docs: add TB to list of supported suffixesKarel Zak2013-03-181-1/+1
| | | | | Reported-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: remove optimization from verify( funrtionKarel Zak2013-02-011-0/+11
| | | | | | | | | | | | | | | | 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>
* blkid: fix man page messKarel Zak2012-12-101-6/+4Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fix bold style of man page referencesMike Frysinger2012-10-091-1/+1
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* textual: typo fixesGilles Espinasse2012-10-021-1/+1
| | | | Signed-off-by: Gilles Espinasse <g.esp@free.fr>
* blkid: document LIBBLKID_DEBUG usersDavidlohr Bueso2012-09-041-0/+3
| | | | | | | Update the manpages of programs that use this environment variable for extra debugging information. Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* Fix typos found by misspellingsBernhard Voelker2012-04-231-1/+1
| | | | | | | | | | | | | | | 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>
* blkid: add docs about PARTUUID= and PARTLABEL=Karel Zak2012-04-191-4/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: clarify KiB vs. KB in man pagesBernhard Voelker2012-03-301-3/+4
| | | | | | | | | 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>
* blkid: add note about variable tags and devices order.Karel Zak2012-03-291-1/+2
| | | | | Reported-by: Michael Conrad <mconrad@intellitree.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: mark udev and list blkid(8) output formats deprecatedKarel Zak2012-03-261-2/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: move cache to /run on new systemsKarel Zak2012-01-251-4/+30
| | | | | | | | | | | | | | | | | | | | | | 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>
* blkid: remove -w option from man page and usage() outputKarel Zak2012-01-251-13/+0Star
| | | | | | | | | | | | 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>
* blkid: fix unfinished sentence for -l option in blkid.8Dave Reisner2011-09-271-1/+1
| | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* docs: uniformize the header and footer lines in man pagesBenno Schulenberg2011-08-221-1/+1
| | | | | | | | | | 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>
* blkid: list all known filesystems/RAIDs (add -k option)Karel Zak2011-06-201-0/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: add -d option to print non-printable charsKarel Zak2011-03-291-1/+6
| | | | | Reported-by: laborer2008 laborer <laborer2008@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* textual: tweak several manpages, mainly the blkid oneBenno Schulenberg2011-03-081-50/+47Star
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* blkid: add new return code 8 for ambivalent low-level probing resultKarel Zak2011-02-031-2/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: add note about PART_ENTRY_ tags to blkid.8Karel Zak2011-02-031-1/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* rename util-linux-ng back to util-linuxKarel Zak2010-11-301-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: remove duplicate option from man pageKarel Zak2010-05-211-4/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: add 'export' output formatKarel Zak2010-05-141-3/+7
| | | | | | | | 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>
* blkid: add -i option to print I/O limitsKarel Zak2010-05-131-3/+20
| | | | | | | | 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>
* blkid: update man page/usage()Karel Zak2010-05-131-0/+2
| | | | | | | 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>
* blkid: support suffixes for -O <offset> and -S <size>Karel Zak2010-03-301-2/+5
| | | | | | for example: blkid -p -O 17816085KiB /dev/sda Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: cleanup man pageKarel Zak2010-03-231-18/+17Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: add -n <list> optionKarel Zak2010-03-231-0/+17
| | | | | | | | | | | 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>
* blkid: add pretty output, document -L incompatibility with e2fsprogsKarel Zak2009-10-141-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | ... 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>
* wipefs: new commandKarel Zak2009-10-061-0/+1
| | | | | | | | | | | | | | | | # ./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>