Commit Graph

500 Commits

Author SHA1 Message Date
Peter Rajnoha 8265242b22 lsblk: count with terminating character, man page -s entry
Signed-off-by: Peter Rajnoha <prajnoha@redhat.com>
2012-04-04 13:32:25 +02:00
Karel Zak 4581bd9c67 build-sys: disable chkdupexe by default, mark as deprecated
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-04-04 12:18:32 +02:00
Karel Zak 9554f7abd8 lsblk: use libmount to get mountpoints/swaps
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-04-03 13:43:50 +02:00
Sami Kerola 13814e3697 findmnt: remove dublicate usage() line
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-30 16:48:12 +02:00
Sami Kerola efe030d66c findfs: add --version & align with howto-usage-function.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-30 16:48:11 +02:00
Sami Kerola 5cc12c4090 findmnt: add --version & align with howto-usage-function.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-30 16:48:11 +02:00
Karel Zak 99727496ed wipefs: use strtosize_or_err()
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-30 16:17:49 +02:00
Karel Zak 3c2662d565 blkid: use strtosize_or_err()
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-30 16:17:36 +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 451d76463c misc: clenaup SIZE columns in lsblk and findmnt
Note that lib/tt.c will never truncate columns without TT_FL_TRUNC or
relative column width. So it's fine to set small width for columns
with SIZEs, the defined width is minimal width.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-20 11:04:48 +01:00
Karel Zak cd4ed46f98 findmnt: improve --df output
* don't print pseudo-filesystems (except tmpfs)
 * add --all to disable built-in filters
 * don't overwrite --df --output=<list> with default columns

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-20 10:52:13 +01:00
Karel Zak d7bcb2052e findmnt: use xasprintf()
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-20 09:55:24 +01:00
Dave Reisner eda399b995 findmnt: add -D, --df option to imitate df(1)
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-03-20 09:53:47 +01:00
Dave Reisner a85ef33b16 findmnt: add FS size, avail, used, and use% columns
Provide display of filesystem attributes from statvfs(3). These are all
displayed in human readable format.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-03-20 09:53:41 +01:00
Dave Reisner 99d618c0eb checkxalloc: nudge regex, fix newfound instances
Using the -w flag with grep actually fought against us here, and hid
some instances where xalloc functions weren't used. Discard it in
favor of an explicit word boundary as a prefix to the function name,
and extend our requirements on the trailing side of the pattern.

This also fixes the few new instances that were overlooked because of
the regex's deficiency.

[kzak@redhat.com: - fix also newfound in findmnt
                  - remove unnecessary checks after xallocs]

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-20 09:44:40 +01:00
Bill Pemberton 27b35a6d55 findmnt: add -P, --pairs to the man page
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
2012-03-20 09:30:21 +01:00
Sami Kerola fd2e8c693e lslocks: use xasprintf for safe allocation
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-18 14:29:38 +01:00
Sami Kerola 6f312c8957 xalloc: use xasprintf in all files
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-18 14:28:05 +01:00
Dave Reisner abd4e8a52f lsblk: RQ-SIZE is part of the --topology output (man page bugfix)
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-03-13 12:22:11 +01:00
Milan Broz 5791238768 lsblk: add --version switch
[kzak@redhat.com: - update usage() and man page]

Signed-off-by: Milan Broz <mbroz@redhat.com>
2012-03-08 16:19:57 +01:00
Milan Broz 24df2633d3 wipefs: Fix mismatch if more -o options used.
If there are more offset options specified, some could be lost.

Try
pvcreate /dev/sd[bcde]
mdadm -C -l 5 -n4 /dev/md0 /dev/sd[bcde]
mdadm --stop /dev/md0

wipefs -n -o 0x1000 -o 0x218 /dev/sdb
- LVM2 signature remains there

wipefs -n -o 0x218 -o 0x1010 /dev/sdb
- no report about ignored signature

Signed-off-by: Milan Broz <mbroz@redhat.com>
2012-03-08 16:11:36 +01:00
Karel Zak 7c9c872c2b lsblk: escape unsafe chars in parsable output
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-08 16:04:45 +01:00
Karel Zak 540d506f71 lsblk: use readlink_at from at.c
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-07 14:28:52 +01:00
Peter Rajnoha 09a71aa1d5 lsblk: add inverse tree support (-s)
$ lsblk --inverse -o NAME /dev/dm-0
NAME
luks-10d813de-fa82-4f67-a86c-23d5d0e7c30e (dm-0)
└─sda6
  └─sda

Signed-off-by: Peter Rajnoha <prajnoha@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-07 13:54:11 +01:00
Karel Zak 205eb00283 lsblk: remove (dm-N) from NAME for raw/pair output format
$ lsblk -P -o NAME /dev/dm-0
 NAME="luks-10d813de-fa82-4f67-a86c-23d5d0e7c30e (dm-0)"

the (dm-0) sucks in the parsable output...

Reported-by: Peter Rajnoha <prajnoha@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-07 13:11:54 +01:00
Davidlohr Bueso 74fa8244de lslocks: add TYPE column
By knowing the lock's type (flock or posix), the user can have more
information about the lock and how it was created.

[kzak@redhat.com: - rename PERSONALITY to TYPE,
                  - rename ACCESS to MODE]

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-06 17:07:40 +01:00
Karel Zak dab3357387 blkid: add DEVNAME= to export output format
Reported-by: Balamurugan Arumugam <barumuga@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-02 14:05:26 +01:00
Karel Zak 86ace3f407 wipefs: always print devname
It seems too smart to print devname according to number of devices.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-01 15:44:04 +01:00
Milan Broz c10695f8a4 wipefs: support more device arguments for wipefs
[kzak@redhat.com: - print devname only if more devices specified]

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-01 15:36:45 +01:00
Milan Broz 0fd93af697 wipefs: add quiet flag (-q)
Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-01 15:24:05 +01:00
Karel Zak c4137d397c lslocks: add --notruncate, minor fixes in man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-02-29 14:26:46 +01:00
Davidlohr Bueso 4473c8dc8a lslocks: add lslocks.8 man page
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-02-29 14:15:01 +01:00
Davidlohr Bueso 3dc02ef408 lslocks: new command
The new lslocks(8) program is meant to replace the deprecated lslk(8). It is
designed for simplicity and removes unnecessary Unix legacy outputs and
options:

- Don't output inode number, whence and maj:min device numbers.
- Don't provide nonblocking syscall options stat(2) and readlink(2)
- Remove lslk's alternate default kernel name list file path (-k)

The option to use nonblocking calls was previously intended for NFS partitions;
however this should be transparent to utility programs considering that
timeouts can occur generically (fuse - sshfs, NFS, netdevs, etc).

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-02-29 14:08:11 +01:00
Sami Kerola f06b43285d build-sys: enhance readability of the autotools files
Several horizontal lists are turned to vertical, and sorted to
alphabetical order. Additionally spaces are converted to tabs where
ever possible.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-02-28 13:29:35 +01:00
Davidlohr Bueso aec5c2a626 misc-utils: fix typos
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2012-02-24 14:15:39 +01:00
Sami Kerola 7cebf0bb4f docs: corrections to FSF license files, and postal address
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>
2012-02-24 14:13:35 +01:00
Karel Zak 1dc42eb620 lsblk: check stat() return code
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-02-03 00:01:32 +01:00
Karel Zak fec1339f9f blkid: remove dead assigment
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-02-02 14:33:18 +01:00
Karel Zak 762ef0e12d findmnt: initialize rc variable 2012-02-02 12:50:44 +01:00
Karel Zak 275c9a4849 findmnt: make --poll more robust
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-02-02 00:05:24 +01:00
Karel Zak e766a3b088 kill: fix fd leak
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-02-01 14:03:20 +01:00
Karel Zak 7113ddecf8 blkid: add comment to keep static analysers happy 2012-01-31 21:16:28 +01:00
Karel Zak d75bcac49a blkid: check fd before use [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-31 14:19:27 +01:00
Karel Zak 54b6adf344 namei: more robust add_it() [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-31 14:04:03 +01:00
Karel Zak d1cabd5ce5 findmnt: fix resource leak [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-30 23:49:23 +01:00
Karel Zak 48a5ed6306 whereis: move token assignment into loop syntax
Reported-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-30 13:19:14 +01: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