summaryrefslogtreecommitdiffstats
path: root/misc-utils/lslocks.c
Commit message (Collapse)AuthorAgeFilesLines
* lslocks: use TT_FL_FREEDATA for tt tableKarel Zak2013-09-161-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* misc: use libmnt_table reference counterKarel Zak2013-08-211-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lslocks: support -o +<list> conventionKarel Zak2013-02-181-5/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lslocks: add BLOCKER columnKarel Zak2013-02-181-21/+41
| | | | | | BLOCKER - PID of the process blocking the lock Signed-off-by: Karel Zak <kzak@redhat.com>
* lslocks: detect blocked locks, fix /proc/locks parserKarel Zak2013-02-141-5/+10
| | | | | | | | | | | | | | | | | | | | $ flock foo -c "sleep 100" & flock foo -c "sleep 100" old version: $ lslocks lslocks: failed to parse pid: 'WRITE' new version: COMMAND PID TYPE SIZE MODE M START END PATH [...] flock 1318 FLOCK 0B WRITE* 0 0 0 /home/projects/ flock 1319 FLOCK 0B WRITE 0 0 0 /home/projects/ The asterisk (e.g. WRITE*) is used for blocked processes. Reported-by: Mantas Mikulenas <grawity@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* lslocks: use libmount to parse mountinfoKarel Zak2013-02-141-17/+15Star
| | | | | | | | | | | | | old version: $ strace -e open lslocks 2>&1 | grep mountinfo | wc -l 118 new version: strace -e open ./lslocks 2>&1 | grep mountinfo | wc -l 1 Reported-by: Bernhard Voelker <mail@bernhard-voelker.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* lslocks: fix compiler warningsKarel Zak2012-12-201-3/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lslocks: don't care about xasprintf() return codeKarel Zak2012-12-121-11/+10Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* misc: make readlink() usage more robustKarel Zak2012-10-231-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* textual: add missing comma and colon in some help textsBenno Schulenberg2012-09-041-1/+1
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* lslocks: fix shadow declarationSami Kerola2012-07-261-2/+2
| | | | | | | | misc-utils/lslocks.c:157:49: warning: declaration of 'pid' shadows a global declaration [-Wshadow] misc-utils/lslocks.c:80:14: warning: shadowed declaration is here [-Wshadow] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* misc-utils: cleanup strtoxx_or_err()Karel Zak2012-05-151-4/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lslocks: fix bracket indentationDavidlohr Bueso2012-05-101-1/+1
| | | | Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* lslock: remove duplicate variableKarel Zak2012-05-031-2/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'close_stream' of git://github.com/kerolasa/lelux-utiliteetitKarel Zak2012-04-111-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'close_stream' of git://github.com/kerolasa/lelux-utiliteetit: disk-utils: verify writing to streams was successful fdisk: verify writing to streams was successful getopt: verify writing to streams was successful hwclock: verify writing to streams was successful login-utils: verify writing to streams was successful misc-utils: verify writing to streams was successful mount: verify writing to streams was successful partx: verify writing to streams was successful schedutils: verify writing to streams was successful sys-utils: verify writing to streams was successful term-utils: verify writing to streams was successful text-utils: verify writing to streams was successful include: add stream error checking facility Conflicts: fdisk/fdisk.c
| * misc-utils: verify writing to streams was successfulSami Kerola2012-04-041-0/+2
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | lslocks: minor fix in usage()Karel Zak2012-03-271-1/+1
|/ | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lslocks: use xasprintf for safe allocationSami Kerola2012-03-181-9/+9
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* lslocks: add TYPE columnDavidlohr Bueso2012-03-061-19/+30
| | | | | | | | | | | 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>
* lslocks: add --notruncate, minor fixes in man pageKarel Zak2012-02-291-2/+15
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lslocks: new commandDavidlohr Bueso2012-02-291-0/+550
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>