summaryrefslogtreecommitdiffstats
path: root/misc-utils
Commit message (Collapse)AuthorAgeFilesLines
* misc-utils: fix typosDavidlohr Bueso2012-02-242-2/+2
| | | | Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* docs: corrections to FSF license files, and postal addressSami Kerola2012-02-243-9/+9
| | | | | | | | | | | | | | The COPYING and Documentation/licenses/COPYING* files are being replaced by files from GNU web site. http://www.gnu.org/licenses/gpl-2.0.txt http://www.gnu.org/licenses/lgpl-2.1.txt Postal addresses to FSF in other files are updated to match with the address in license files. Reference: http://lists.gnu.org/archive/html/freefont-announce/2005-04/msg00001.html Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* lsblk: check stat() return codeKarel Zak2012-02-031-5/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: remove dead assigmentKarel Zak2012-02-021-1/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* findmnt: initialize rc variableKarel Zak2012-02-021-1/+1
|
* findmnt: make --poll more robustKarel Zak2012-02-021-3/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* kill: fix fd leakKarel Zak2012-02-011-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: add comment to keep static analysers happyKarel Zak2012-01-311-0/+1
|
* blkid: check fd before use [coverity scan]Karel Zak2012-01-311-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* namei: more robust add_it() [coverity scan]Karel Zak2012-01-311-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* findmnt: fix resource leak [coverity scan]Karel Zak2012-01-301-1/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* whereis: move token assignment into loop syntaxKarel Zak2012-01-301-5/+3Star
| | | | | Reported-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: move cache to /run on new systemsKarel Zak2012-01-252-5/+32
| | | | | | | | | | | | | | | | | | | | | | 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-252-22/+2Star
| | | | | | | | | | | | 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>
* libmount: remove fstab.d supportKarel Zak2012-01-241-4/+1Star
| | | | | | | | If you really need to store your configuration to a alternative files then you have to explicitly specify the files or directories on mount(8) command line by --fstab option. Signed-off-by: Karel Zak <kzak@redhat.com>
* findmnt: support multiple --tab-file optionsKarel Zak2012-01-231-38/+70
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* findmnt: add note about LIBMOUNT_* env.variablesKarel Zak2012-01-201-0/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* findmnt: revert --fstab behavior, add --tab-file optionKarel Zak2012-01-202-14/+48
| | | | | | | | | | | | | | The optional argument for -s, --fstab options (--fstab=file) is not backwardly compatible, because command line with short options (e.g. findmnt -snr) will be interpreted incorrectly. This patch removes support for the optional --fstab argument and introduces a new option --tab-file, for example: findmnt --fstab --tab-file=/etc/fstab.foo Reported-by: Juergen Daubert <jue@jue.li> Signed-off-by: Karel Zak <kzak@redhat.com>
* lsblk: add UUID to --fs outputKarel Zak2012-01-161-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* wipefs: use xalloc libDavidlohr Bueso2011-12-161-4/+1Star
| | | | Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* findmnt: support alternative location of fstabDave Reisner2011-12-162-6/+9
| | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* findmnt: use warnx for libmnt error callbackDave Reisner2011-12-161-1/+1
| | | | | | | | | libmount doesn't set errno appropriately here: $ findmnt -s findmnt: /etc/fstab: parse error at line 20: Success Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* logger: fix remote loggingKarel Zak2011-12-081-3/+3
| | | | | Reported-by: Hervé Quillévéré <herve_quillevere@herveq.tk> Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: check HAVE_ definitions with #ifdef [smatch scan]Sami Kerola2011-12-021-1/+1
| | | | | | Fix to `warning: undefined preprocessor identifier' messages. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* libmount: add "+" prefix for options pattern (e.g findmnt -O)Karel Zak2011-12-011-3/+3
| | | | | | | | | | | | | | Examples: * findmnt --fstab -O noauto Returns all entries where is not "auto" option (including entries with "noauto" option. * findmnt --fstab -O +noauto Returns all entries where is literally "noauto" option. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=758457 Signed-off-by: Karel Zak <kzak@redhat.com>
* wipefs: add -t <list> optionKarel Zak2011-11-153-8/+41
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: export info about PT magic stringsKarel Zak2011-11-131-34/+39
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* wipefs: improve -a, use blkid_do_wipe()Karel Zak2011-11-111-66/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some filesystems (e.g. FAT) is possible to detect in many ways -- for example if a magic string is stored on more places on the device. The current implementation always removes from the device only the firstly detected possibility. # wipefs /dev/sdb1 offset type ---------------------------------------------------------------- 0x36 vfat [filesystem] UUID: D203-A7F4 # wipefs -a /dev/sdb1 8 bytes [46 41 54 31 36 20 20 20] erased at offset 0x36 (vfat) # wipefs /dev/sdb1 offset type ---------------------------------------------------------------- 0x0 vfat [filesystem] UUID: D203-A7F4 This patch fixes this issue: # wipefs -a /dev/sdb1 8 bytes were erased at offset 0x00000036 (vfat): 46 41 54 31 36 20 20 20 1 bytes were erased at offset 0x00000000 (vfat): eb 2 bytes were erased at offset 0x000001fe (vfat): 55 aa Signed-off-by: Karel Zak <kzak@redhat.com>
* lib,tt: add TT_FL_NOEXTREMESKarel Zak2011-11-102-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | If you mark a column with TT_FL_NOEXTREMES flag then extremely large fields will no have effect to column width. Foe example: without the TT_FL_NOEXTREMES flag for the 'AAA' column: AAA BBB CCC DDD aa bbb ccc ddd aaaaaaaaaaa bb ccc ddd aa bb ccc ddd aa bb ccc ddd with the flags: AAA BBB CCC DDD aa bbb ccc dddddddddd aaaaaaaaaaa bb ccc dddddddd aa bb ccc dddddd aa bb ccc ddddddddd Signed-off-by: Karel Zak <kzak@redhat.com>
* whereis: remove unused value warningFrancesco Cosoleto2011-11-091-1/+1
| | | | Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* build-sys: cleanup misc-utils/Makefile.amKarel Zak2011-11-031-20/+20
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: cleanup BUILD_UUIDDKarel Zak2011-11-031-1/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsblk: remove __NCOLUMNSDavidlohr Bueso2011-11-021-10/+10
| | | | | | | | | We use ARRAY_SIZE() instead to define the amount of available columns. [kzak@redhat.com: - fix compiler warnings [-Wsign-compare]] Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: print ID_PART_ENTRY_* for small devicesKarel Zak2011-10-211-5/+3Star
| | | | | | | | | | | The current optimization for small devices (1.4MiB) is broken. It checks for partition table, but if nothing is detected then details (ID_PART_ENTRY_*) about the current partition are not gathered. The optimization should be enabled for small *whole* disks only. Reported-by: David Zeuthen <davidz@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* lsblk: inform about depencency to /sys/dev/blockSami Kerola2011-10-102-0/+18
| | | | | | | | | | | | | | | | | | | | | | The lsblk depends on /sys/dev/block/ symlinks, which appeared in kernel 2.6.27. Users with old, or non-sysfs configured, kernel got ealier message lsblk: md0: failed to initialize sysfs handler lsblk: xvda: failed to initialize sysfs handler [...] that I found a little too difficult to understand. This patch will change the message to lsblk: failed to access sysfs directory: /sys/dev/block: No such file or directory and informs in manual page what could be reason to that. [kzak@redhat.com: - use access() rather than opendir()] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'manuals' of https://github.com/kerolasa/lelux-utiliteetitKarel Zak2011-10-101-82/+94
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'manuals' of https://github.com/kerolasa/lelux-utiliteetit: docs: align hexdump.1 with howto-man-page.txt docs: align ul.1 with howto-man-page.txt docs: align rev.1 with howto-man-page.txt docs: align more.1 with howto-man-page.txt docs: align colrm.1 with howto-man-page.txt docs: align colcrt.1 with howto-man-page.txt docs: align col.1 with howto-man-page.txt docs: align wall.1 with howto-man-page.txt docs: align scriptreplay.1 with howto-man-page.txt docs: align script.1 with howto-man-page.txt docs: align renice.1 with howto-man-page.txt docs: align logger.1 with howto-man-page.txt docs: align vipw.8 with howto-man-page.txt docs: fix return value table in fsck.8 docs: chcpu and readprofile are sysadmin utils
| * docs: align logger.1 with howto-man-page.txtSami Kerola2011-10-031-82/+94
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | lsblk: add udev supportIlias Mamedov2011-10-032-4/+48
|/ | | | | | | | | [kzak@redhat.com: - enable udev support by default - don't check for libudev.h - minor udev code refactoring in lsblk.c] Signed-off-by: Ilias Mamedov <arknir@yandex.ru> Signed-off-by: Karel Zak <kzak@redhat.com>
* misc: use %m in format string instead of %s and strerror(errno)Petr Uzel2011-09-272-17/+10Star
| | | | Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* blkid: fix unfinished sentence for -l option in blkid.8Dave Reisner2011-09-271-1/+1
| | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* uuidd: Add missing break to option case statementEric Sandeen2011-09-271-0/+1
| | | | | | | | Specifying the "-n" option to uuidd would incorrectly fall through to the "-p" case, and assign that number to the pidfile_path. Signed-off-by: Eric Sandeen <sandeen@redhat.com>
* whereis: non-ANSI definition [smatch scan]Karel Zak2011-09-121-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* logger: non-ANSI definition [smatch scan]Karel Zak2011-09-121-5/+2Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* cal: non-ANSI definition [smatch scan]Karel Zak2011-09-121-6/+2Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: potential null derefence [smatch scan]Karel Zak2011-09-121-3/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* kill: potential null derefence [smatch scan]Karel Zak2011-09-121-3/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* kill: fix issue warned by smatchSami Kerola2011-09-101-1/+2
| | | | | | misc-utils/procs.c +82 get_pids(52) error: potential null derefence 'pids'. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* whereis: fix gcc warnings [-Wsign-compare]Karel Zak2011-08-311-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'docs-dir' of https://github.com/kerolasa/lelux-utiliteetitKarel Zak2011-08-313-117/+0Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'docs-dir' of https://github.com/kerolasa/lelux-utiliteetit: docs: remove duplicated text docs: require kernel support before accepting use of it docs: note about independent super block structs docs: add libmount & libblkid debug instructions Documentation: add debugging doc arch: start using arch as a usage() example docs: new file Documentation/release-schedule.txt docs: move setuid information from reame to hwclock.8 docs: clean up old readme files docs: copy contributors from legacy files to AUTHORS docs: new file Documentation/howto-man-page.txt docs: new file Documentation/source-code-management.txt docs: new file Documentation/howto-contribute.txt docs: new file Documentation/howto-compilation.txt docs: tell what the Documentation/ is about docs: add usage() howto for contributors docs: Documentation directory added docs: remove README.clear
| * docs: Documentation directory addedSami Kerola2011-08-123-117/+0Star
| | | | | | | | | | | | | | | | Move readme, licence, change log, relese notes and other supplementary files to a Documentation directory. This commit does not change contents of any other but few Makefile.am files. Signed-off-by: Sami Kerola <kerolasa@iki.fi>