summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-02-17cfdisk: support for illumos disks (/dev/rdsk/c0t0d0p0)HEADmasterIgor Pashev1-0/+13
2014-02-17blkdev_get_size() for illumosIgor Pashev2-1/+16
2014-02-16s_addr is defined to something strange on illumosIgor Pashev1-5/+5
2014-02-16include <termios.h> for TIOCSCTTYIgor Pashev1-0/+1
2014-02-16Use utmpxIgor Pashev6-105/+192
We do not use login & friends from util-linux, but for completeness
2014-02-16Some utils are linux onlyIgor Pashev3-2/+34
2014-02-15include <libgen.h> for basename()Igor Pashev1-0/+1
2014-02-15Need sys/sysmacros.h on illumos for major/minorIgor Pashev2-0/+8
2014-02-15Ensure TTYDEF_SPEED is definedIgor Pashev1-0/+4
2014-02-15Include syslog.h for syslog() definitionIgor Pashev1-1/+1
2014-02-15getting the hardware addressIgor Pashev2-7/+15
2014-02-12include <libgen.h> for basename()Igor Pashev1-0/+1
2014-02-12include <stdlib.h> when testing for wcharIgor Pashev1-0/+1
2014-02-12include <signal.h>Igor Pashev1-0/+1
2014-02-12undef sun in libfdisk/src/sun.cIgor Pashev1-0/+5
2014-02-12Define missed macrosIgor Pashev1-0/+33
OXTABS, TTYDEF_OFLAG, CDISCARD and others
2014-02-12Removed check for PKG_PROG_PKG_CONFIGIgor Pashev1-6/+0
It always fails
2014-02-10scriptreplay: Add --maxdelay option.Jesper Dahl Nyerup2-4/+20
This option caps the delay between updates, to avoid long pauses in transcript playback. Signed-off-by: Jesper Dahl Nyerup <nyerup@one.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2014-02-10cal: remove unnecessary static variablesSami Kerola1-19/+0
Not in use since commit 95f4adde867492563167b11ba94dba67f93809aa. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-02-10renice: correct max priority in renice man pagePhillip Susi1-7/+3
The man page stated that the PRIO_MAX is 20. While this is correct, the header definition is wrong and the max value is actually 19. [kzak@redhat.com: - remove PRIO_MAX from man page, kernel syscalls use hardcoded numbers for the priority limits] Signed-off-by: Phillip Susi <psusi@ubuntu.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2014-02-10mount: remove obsolete and confusing statement from mount.8Phillip Susi1-2/+1
The wording was confusing and suidperl has gone the way of the dodo, and really didn't need mentionting in mount.8. Signed-off-by: Phillip Susi <psusi@ubuntu.com>
2014-02-10fix mkfs --verbose and man pagePhillip Susi2-6/+2
mkfs did not actually accept the long form --verbose option. Also the man page seemed to indicate that version/verbose/help options were passed to the filesystem specific utility when this is not the case. Signed-off-by: Phillip Susi <psusi@ubuntu.com>
2014-02-10hwclock: internationalizing the message of the used interfaceBenno Schulenberg4-4/+4
In addition, do it in a single sentence instead of in two fragments. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-02-10getopt.1: The usual doc dir is /usr/share/doc, not .../docsVille Skyttä1-1/+1
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
2014-02-10setpriv: Fix --apparmor-profileAndy Lutomirski1-2/+2
There were two bugs. First, trying to access /proc/self/attr/exec with O_CREAT | O_EXCL has no chance of working. Second, it turns out that the correct command to send is "exec", not "changeprofile". Of course, there was no way to know this until: commit 3eea57c26e49a5add4c053a031cc2a1977b7c48e Author: John Johansen <john.johansen@canonical.com> Date: Wed Feb 27 03:44:40 2013 -0800 apparmor: fix setprocattr arg processing for onexec Signed-off-by: Andy Lutomirski <luto@amacapital.net>
2014-02-10last: make session gone determination more robustSami Kerola1-3/+22
Earlier determination that used kill with signal zero to pid was prone to false positive reports, due reuse of pid space and unrelated processes. New function is_phantom() tries do a little bit better job, but fails to be perfect. It seems linking to gether utmp session start time or terminal id with /proc/<pid>/ information is not as simple as one might hope. Reported-by: Karel Zak <kzak@redhat.com> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-02-10hexdump: add highlighting supportOndrej Oprala35-1/+1268
[kzak@redhat.com: - fix coding style, - use xalloc in all code, - fix strtol usage] Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2014-02-10lib/color: add colorscheme parserKarel Zak2-2/+48
2014-02-10Merge branch 'master' of https://github.com/micha137/util-linuxKarel Zak1-1/+1
2014-02-10lsblk: add PARTTYPE tagMichael Marineau1-0/+13
To stay in sync with blkid add PARTTYPE as an available output column.
2014-02-06tests: automatic whitespace trimming broke earlier commitSami Kerola0-0/+0
Setting in .gitconfig to do 'git apply --whitespace=fix' automatically turned automation against user. Frankencommit: 4d2f0d08f67707b6d44d4a45fb6e21876c02c731 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-02-06tests: cal(1) is year is limited to signed 32 bit valueSami Kerola4-369/+355
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-02-06cal: limit year to 32 bit valueSami Kerola1-21/+23
This is done to keep things simple, when considering tests, for both 64 and 32 bit architectures. Setting the upper limit of a year value to to 2^31-1 (2147483646) should be enough for anyone. Reported-by: Mike Frysinger <vapier@gentoo.org> Reference: http://www.spinics.net/lists/util-linux-ng/msg08662.html Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-02-06fsck: don't return error if fsck.<type> does not existKarel Zak1-32/+42
The error message is expected for "really wanted" set of filesystems (extN, ..), otherwise it does not make sense for filesystems like btrfs or xfs. Reported-by: Tom Gundersen <teg@jklm.no> Signed-off-by: Karel Zak <kzak@redhat.com>
2014-02-06nsenter: fix set{gid,uid} order,drop supplementary groupsKarel Zak1-2/+5
.. always, always setgid() before setuid()! Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1061751 Signed-off-by: Karel Zak <kzak@redhat.com>
2014-02-06dmesg: -w output not line-bufferedKarel Zak1-0/+2
when writing to e.g. a pipe, output from dmesg -w can come many minutes late due to buffering. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1060925 Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-24losetup: wait for udevKarel Zak2-5/+19
On system with /dev/lop-control the udevd creates /dev/loopN nodes. It seems better to wait a moment after unsuccessful open(/dev/loopN) and try it to open again. The problem is pretty visible on systems where udevd also modifies permission for loopN devices, then open() fails with EACCES when losetup executed by non-root user (but user who is in "disk" group). Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1045432 Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-24include/c.h: prefer nanosleep() over usleep()Karel Zak8-16/+25
Let's use nanosleep() although if usleep() exists. The nanosleep function does no interact with signals and other timers. The patch introduces xusleep() as replacement to libc (or our fallback) usleep(). Yes, we don't want to use struct timespec + nanosleep() everywhere in code as nano-time resolution is useless for us. The patch also enlarges delays in some busy wait loops. It seems enough to try read/write 4x per second. Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-20flock: Change the 'exit status' man page section to make more senseWieland Hoffmann1-2/+2
Signed-off-by: Wieland Hoffmann <themineo@gmail.com>
2014-01-20wipefs: call BLKRRPART when erase partition tableKarel Zak2-8/+36
It's better to be smart than make things inconsistent (without BLKRRPART kernel still uses the erased PT and udev-db still contains obsolete information). Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-20libblkid: detect alone PMBRKarel Zak3-2/+44
wipefs(8) has to also erase PMBR, not GPR header only, otherwise the device could be still interpreted as a device with a partition table. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1054186 Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-17tests: update build-sys testsKarel Zak18-18/+15
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-17build-sys: fstrim depends on libmountKarel Zak2-6/+14
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-17mkswap: fix compiler warning [-Wunused-variable]Karel Zak1-1/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-16libblkid: no more probe for btrfs backup superblockKarel Zak4-19/+2
* Linux kernel cares about the first superblock only * backup superblock are FS specific stuff and there is no reason to care about it in generic tools * the problem with broken btrfs utils has been already fixed (it was possible to use the utils on filesystem with erased primary superblok without any warning message). Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-16wipefs: add comments to codeKarel Zak1-4/+7
2014-01-16script: use all-io.h to make the code more robustKarel Zak1-9/+5
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-16script: fix inconsistent -q, use poll() rather then O_NONBLOCKKarel Zak1-25/+17
- don't suppress "Script done" message in typescript file by -q (note that -q has no effect to "Script started" message) - simplify the code by poll() Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-16script: don't wait for empty descriptors if child is deadKarel Zak1-4/+8
The current code waits for empty file master and slave descriptors, but it makes sense only if there is child process that cares (read) about data in the descriptors. Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-15ionice: Fix output for case ioclass==0Michael Bunk1-1/+1
output "none" instead of "unknown"