summaryrefslogtreecommitdiffstats
path: root/misc-utils
Commit message (Collapse)AuthorAgeFilesLines
* lsblk: fix ul_path_read_string() usageKarel Zak2018-06-211-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsblk: fix COL_SCHEDKarel Zak2018-06-211-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsblk: document --sysrootKarel Zak2018-06-212-0/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsblk: fix sysfs_devno_to_devname() usageKarel Zak2018-06-211-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsblk: follow --sysroot when read mountpointsKarel Zak2018-06-211-2/+16
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsblk: use prefix for DM nameKarel Zak2018-06-211-4/+14
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsblk: add --sysrootKarel Zak2018-06-211-3/+13
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsblk: use new ul_path_* APIKarel Zak2018-06-211-94/+82Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsblk: add partition table UUID and type fields.Milan Broz2018-06-191-0/+27
| | | | | | | | | | This patch adds PTUUID and PTTYPE fields to lsblk, that are corresponding fields to ID_PART_TABLE_UUID and ID_PART_TABLE_TYPE in udev database. [kzak@redhat.com: - small change in PTUUID description] Signed-off-by: Milan Broz <gmazyland@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* wipefs: postpone BLKRRPART until all is doneKarel Zak2018-06-112-7/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's possible we erase from the whole device before we erase from the partition on the same disk: # wipefs -a /dev/sdc /dev/sdc1 the current code calls re-read PT ioctl immediately after erase (so, before sdc1 is processed). The result is that sdc1 node is no more accessible: # wipefs -a /dev/sdc /dev/sdc1 /dev/sdc: 2 bytes were erased at offset 0x000001fe (dos): 55 aa /dev/sdc: calling ioctl to re-read partition table: Success wipefs: error: /dev/sdc1: probing initialization failed: No such file or directory It seems the most simple solution is to postpone the re-read ioctl and do it as the last thing. # wipefs -a /dev/sdc /dev/sdc1 /dev/sdc: 2 bytes were erased at offset 0x000001fe (dos): 55 aa /dev/sdc1: 2 bytes were erased at offset 0x00000438 (ext4): 53 ef /dev/sdc: calling ioctl to re-read partition table: Success The patch also adds a small delay before the re-read ioctl call. It's not elegant, but without the usleep(25000) the first attempt returns EBUSY. Addresses: https://github.com/karelzak/util-linux/issues/598 Signed-off-by: Karel Zak <kzak@redhat.com>
* nls: remove translation stringsSami Kerola2018-05-282-4/+4
| | | | | | | | | | While looking earlier commit I noticed everything but formatting was removed from a message in namei.c file. That inspired me to look if there are more strings that does not need translation project attention. This change removes at least some of them, if not all. Reference: e19cc7b65b31c57f0fe9cb73c9afad5197796f82 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* man: Change the only argument to two for the two-fonts macrosBjarni Ingi Gislason2018-05-231-1/+1
| | | | | | | Punctuation marks have been left in the only argument of two-fonts macros, instead of being separated from it to make the second one. Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
* man: Use the correct macro for a font change of one argumentBjarni Ingi Gislason2018-05-239-37/+37
| | | | | | | | Use the correct macro (I, B) for the font change of one argument, not those that are used for alternating two fonts, like "BR", "IR", "RB", or "RI". Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
* lsblk: fix notes about RAM disksKarel Zak2018-05-151-3/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsblk: don't exclude RAM disks on --allKarel Zak2018-05-151-1/+1
| | | | | Reported-by: Milan Broz <gmazyland@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* misc-utils/findmnt.8: add --pseudo and --real optionssluidfoe2018-05-101-1/+7
|
* misc-tools/findmnt: a few whitespace fixessluidfoe2018-05-101-3/+3
|
* misc-tools/findmnt: add --pseudo, --real filterssluidfoe2018-05-102-1/+22
|
* lslocks: add --output-all optionSami Kerola2018-05-032-0/+12
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* findmnt: add --output-all optionSami Kerola2018-05-032-1/+16
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* 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>
* wipefs: use scols_column_set_json_type()Karel Zak2018-04-181-2/+10
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lslocks: use scols_column_set_json_type()Karel Zak2018-04-181-1/+27
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lslocks: add --bytes cleanup SIZE usageKarel Zak2018-04-182-7/+19
| | | | | | | | The new command line option --bytes disables human readable output for the SIZE and keep size in bytes. We use the same concept for all our utils. Signed-off-by: Karel Zak <kzak@redhat.com>
* findmnt: use scols_column_set_json_type()Karel Zak2018-04-181-2/+24
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fincore: use scols_column_set_json_type()Karel Zak2018-04-181-1/+21
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'rename-interactive' of https://github.com/g-raud/util-linuxKarel Zak2018-04-162-17/+122
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | * 'rename-interactive' of https://github.com/g-raud/util-linux: rename: fixup & style (no functional changes) rename: test availability of __fpurge() and fpurge() rename: ask(): call __fpurge() to cater for multi-byte characters rename.1: describe interactive mode rename: ask(): print n when EOF on input rename: detect tty in cbreak mode to make ask() read a single byte rename.1: fix warning section rename: add option --interactive to ask before overwriting rename: skip faccessat() failure if AT_SYMLINK_NOFOLLOW is not a valid flag rename: check source file access early
| * rename: fixup & style (no functional changes)G.raud Meyer2018-04-091-6/+5Star
| |
| * rename: test availability of __fpurge() and fpurge()G.raud Meyer2018-04-091-1/+9
| |
| * rename: ask(): call __fpurge() to cater for multi-byte charactersG.raud Meyer2018-04-091-1/+9
| | | | | | | | | | | | | | | | Making a purge in cbreak mode also makes the code compatible with canonical mode. This can be useful in the case a shell, like bash, does not restore the tty state of stopped jobs before restarting them. An alternative fix to this minor shortcoming would be to retest the tty state each time inside ask().
| * rename.1: describe interactive modeG.raud Meyer2018-04-091-0/+13
| |
| * rename: ask(): print n when EOF on inputG.raud Meyer2018-04-091-3/+4
| |
| * rename: detect tty in cbreak mode to make ask() read a single byteG.raud Meyer2018-04-091-1/+15
| | | | | | | | | | | | | | Set tty_cbreak only when tty has a VMIN of 1 to avoid having to purge at all in cbreak mode. The prompt is still compatible with a non interactive input from a pipe.
| * rename.1: fix warning sectionG.raud Meyer2018-04-091-3/+6
| |
| * rename: add option --interactive to ask before overwritingG.raud Meyer2018-04-092-9/+52
| | | | | | | | | | | | | | The option name -i/--interactive is picked from mv(1) and cp(1) from GNU and BSD. Also update the manpage.
| * rename: skip faccessat() failure if AT_SYMLINK_NOFOLLOW is not a valid flagG.raud Meyer2018-04-091-1/+5
| | | | | | | | | | AT_SYMLINK_NOFOLLOW is not required by POSIX and it is not a valid flag on Mac OSX.
| * rename: check source file access earlyG.raud Meyer2018-04-091-0/+12
| | | | | | | | | | | | | | | | | | | | This change makes rename detect inexisting files given on the command line and consider them faliures. This is particularly useful with --no-act (to detect extraneous arguments). It also prevents skipping non existing files (when the modified name happens to exist). This makes --verbose not print skipping messages of false positives (the access error is printed instead).
* | lslocks: fix memory leakKarel Zak2018-04-161-1/+1
| | | | | | | | | | Addresses: https://github.com/karelzak/util-linux/pull/618 Signed-off-by: Karel Zak <kzak@redhat.com>
* | lslocks: add info about OFDKarel Zak2018-04-132-5/+13
| | | | | | | | | | | | | | | | | | | | It seems users are confused by PID -1 and missing path. This patch add more information about OFD locks to the man page and "undefined" to the COMMAND column. References: http://austingroupbugs.net/view.php?id=768 Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1527102 Signed-off-by: Karel Zak <kzak@redhat.com>
* | Merge branch 'rename-fix-noact-without-nooverwrite' of ↵Karel Zak2018-04-092-9/+14
|\| | | | | | | | | | | | | | | | | | | https://github.com/g-raud/util-linux * 'rename-fix-noact-without-nooverwrite' of https://github.com/g-raud/util-linux: rename: prevent --no-act from setting --no-overwrite rename: when --no-overwrite skip verbosily only when --verbose rename: consolidate printing the symlink in addition to its target rename: fix/reverse the semantics of --no-overwrite in --symlink mode
| * rename: prevent --no-act from setting --no-overwriteG.raud Meyer2018-03-292-5/+7
| | | | | | | | | | | | | | | | | | | | | | This fixes a bug introduced by commit fabb90676 ("Added --no-override option to rename.", 2017-05-27) where the fallthrough meant to let --no-act set --verbose was changed to set --no-override (the previous code was too smart). Do not let --no-act set --verbose anymore but update the manual to recommend adding option --verbose. This is to be able to make --no-act detect only non existing file arguments (in a future commit).
| * rename: when --no-overwrite skip verbosily only when --verboseG.raud Meyer2018-03-271-1/+2
| |
| * rename: consolidate printing the symlink in addition to its targetG.raud Meyer2018-03-271-1/+1
| |
| * rename: fix/reverse the semantics of --no-overwrite in --symlink modeG.raud Meyer2018-03-272-3/+5
| | | | | | | | | | | | | | | | | | | | The previous behaviour was to overwrite a symlink only when the new destination did not exist, i.e. to avoid creating a symlink to an existing file! It had not been documented and it seems counter-intuitive to me. So the new behavior protects symlinks pointing to existing targets from being changed. Also update manpage to document this mode.
* | misc-utils/getopt.1: minor corrections to the manualBjarni Ingi Gislason2018-04-061-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Input file is getopt.1 Test nr. 2: Enable and fix warnings from 'test-groff'. Input file is /tmp/getopt.1 <getopt.1>:5 (macro BI): only 1 argument, but more are expected <getopt.1>:419 (macro IR): only 1 argument, but more are expected <getopt.1>:421 (macro IR): only 1 argument, but more are expected chk_manuals: Output is from: test-groff -b -e -mandoc -T utf8 -rF0 -t -w w -z and Test nr. 15: Change the name of a macro for two fonts (e.g., BR and IR) to one letter, if there is only one argument. Add the second argument if needed. It is sometimes part of the first one. 5:.BI getopt 419:.IR /usr/share/getopt/ 421:.IR /usr/share/doc/ ##### Test nr. 8: Protect a full stop (.) with "\&", if it has a blank (white-space) in front of or (ignoring transparent characters to the full stop) after it, and it does not mean an end of a sentence. 204:the next parameter (i.e. separated by whitespace on the command 219:or as the next argument (i.e. separated by whitespace on the command 352:(i.e. a parameter that does not start with a 379:will be parsed. It will still do parameter shuffling (i.e. all ##### Test nr. 20: Use a macro to change to the italic font, instead of \fI [1], if possible. The macros have the italic corrections, but "\c" removes them. [1] man-pages(7) 57:is set, or if the first \fIparameter\fR is not an option (does not start 144:Set quoting conventions to those of \fIshell\fR. ##### Test nr. 21: Use the word (in)valid instead of (il)legal if not related to legal matters. See "www.gnu.org/prep/standards". 25:check for legal options. It uses the ##### Test nr. 28: Wrong distance between sentences or protect the indicator. 1) Separate the sentences and subordinate clauses; each begins on a new line. See man-pages(7) and "info groff". Or 2) Adjust space between sentences (two spaces), 3) or protect the indicator by adding "\&" after it. The "indicator" is an "end-of-sentence character" (.!?). 204:the next parameter (i.e. separated by whitespace on the command 219:or as the next argument (i.e. separated by whitespace on the command 352:(i.e. a parameter that does not start with a 379:will be parsed. It will still do parameter shuffling (i.e. all Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is> #####
* | lsblk: consolidate column types for JSON and qsort()Karel Zak2018-04-031-24/+47
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | namei: provide more usable error message on lstat() errorKarel Zak2018-03-271-4/+5
| | | | | | | | | | Addresses: https://github.com/karelzak/util-linux/issues/608 Signed-off-by: Karel Zak <kzak@redhat.com>
* | Merge branch 'master' of https://github.com/pali/util-linuxKarel Zak2018-03-271-1/+1
|\ \ | |/ |/| | | | | | | | | * 'master' of https://github.com/pali/util-linux: tests: Add tests for FAT32 labels blkid: Encode any field which starts with LABEL in same way as LABEL field libblkid: vfat: Change parsing label in special cases
| * blkid: Encode any field which starts with LABEL in same way as LABEL fieldPali Rohár2017-11-251-1/+1
| | | | | | | | | | | | | | This applies also for LABEL_FATBOOT which contains bytes according to DOS code page and therefore does not contain valid UTF-8 sequence. Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
* | mcookie: (man) add note about getrandom()Karel Zak2018-03-191-2/+4
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>