summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* findmnt: add --bytes to print sizes in bytesKarel Zak2014-02-212-4/+19
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mkfs: mark this wrapper as DEPRECATEDKarel Zak2014-02-212-0/+5
| | | | | | | | | | | | | | | | | Theodore Ts'o: I'll add that I've never been convinced that the mkfs front end is all that useful. It's probably better for people to explicitly run /sbin/mkfs.xfs, /sbin/mkfs.ext4, etc.., so you don't have to worry about which options get passed down to the file system specific mkfs program, and which ones are interpreted by /sbin/mkfs --- and I don't believe /sbin/mkfs adds enough (err, any?) value that using "/sbin/mkfs -t xxx" vs "/sbin/mkfs.xxx" makes any sense whatsoever. ... and I absolutely agree. Reported-by: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Karel Zak <kzak@redhat.com>
* more: improve formatting and wording of man page and help textBenno Schulenberg2014-02-212-34/+35
| | | | | | | Also, slice up the usage text for ease of translation. Reported-by: Phillip Susi <psusi@ubuntu.com> Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* libmount: FS id and parent ID could be zeroKarel Zak2014-02-202-10/+7Star
| | | | | | | | | | It seems that linux 3.14 is able to produce things like: 19 0 8:3 / / rw,relatime - ext4 /dev/sda3 rw,data=ordered ^ Reported-by: Mantas Mikulėnas <grawity@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* fallocate: fix missing sentinel for is_nul()Karel Zak2014-02-191-2/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: add extra checks to XFS proberKarel Zak2014-02-191-16/+142
| | | | | | The current code rely on XFS magic string only. It seems too fragile. Signed-off-by: Karel Zak <kzak@redhat.com>
* fallocate: code optimalizationsKarel Zak2014-02-191-18/+29
| | | | | | | | | | | | Based on Pádraig Brady review: * use is_nul() from coreutils rather then memcmp() * always call skip_hole() (SEEK_DATA) * fix possible overflows Signed-off-by: Karel Zak <kzak@redhat.com>
* fallocate: use POSIX_FADV_DONTNEED to discard cached dataKarel Zak2014-02-181-3/+27
| | | | | | | | The patch discard cached data in 1MiB (or bigger) steps. Thanks to Pádraig Brady. Signed-off-by: Karel Zak <kzak@redhat.com>
* fallocate: use SEEK_DATA on already sparse filesKarel Zak2014-02-181-3/+35
| | | | | | | | | It's more efficient to skip already known holes by SEEK_DATA (seek to the next area with data). Thanks to Pádraig Brady. Signed-off-by: Karel Zak <kzak@redhat.com>
* fallocate: fix man page synopsisKarel Zak2014-02-171-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: enable parallel tests for make checkKarel Zak2014-02-171-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: make tests to run parallelSami Kerola2014-02-172-20/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | Unarguably this change makes test output to be more messy, but when I compare run time tells with clear numbers parallel is quicker. For me the quickness is important factor. Running test suite always after a change is preferrably quick, and if something is indicated to be broken it is ok to spend time in drilling down what happen. $ time ./tests/run.sh --parallel=5 [...] real 1m48.037s Same without parallelization. $ time ./tests/run.sh real 3m16.687s The default is changed to be parallel, where job count is same as number of CPUs. [kzak@redhat.com: - propagate --parallel into function.sh - don't use extra title for non-parallel execution - disable by default] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: fdisk now prints SGI system partitions tooKarel Zak2014-02-171-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update libmount tabdiff testsKarel Zak2014-02-174-0/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update ionice testKarel Zak2014-02-171-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* isosize: make --divisor to require argumentSami Kerola2014-02-171-1/+1
| | | | | | Silly bug, only the short option -d allowed divisor argument. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add isosize --sectors and --divisor testsSami Kerola2014-02-174-1/+14
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* isosize: move file name printing after error determinationSami Kerola2014-02-171-6/+5Star
| | | | | | | | | | | | Earlier the filename printing was buffered, and exit at error made output to appear in front of prompt. Output below demonstrates the brokenness. prompt> isosize /etc / isosize: /etc: might not be an ISO filesystem isosize: read error on /etc: Is a directory /etc: prompt> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* swaplabel: wrong version number in checkSami Kerola2014-02-171-1/+1
| | | | | | | | | | | $ swaplabel /dev/sda2 swaplabel: /dev/sda2: unsupported swap version '1' The mkswap does not allow any other version, so swaplabel(8) must be wrong. Reference: https://github.com/karelzak/util-linux/blob/master/disk-utils/mkswap.c#L520 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: align last.1 with recent phantom detectionSami Kerola2014-02-171-8/+8
| | | | | | | None existing account is not still-logged-in but gone mysteriously, assuming wtmp logout markup is missing. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: make hexdump.1 color specification easier to understandSami Kerola2014-02-171-36/+36
| | | | | | | Fix also spacing, input line lenghts, and troff table for data that is a table. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tools: add usage information to checkconfig.shSami Kerola2014-02-171-0/+11
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: avoid executing dirname(1) commandSami Kerola2014-02-17138-138/+138
| | | | | | Bash parameter expansion does the same thing. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: fix trailing spaces in cal(1) stuffKarel Zak2014-02-173-389/+391
| | | | | Reported-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: initialize *root to NULL in mnt_table_get_root_fsThomas Bächler2014-02-171-0/+2
| | | | | | | | mnt_table_get_root_fs only works when *root is set to NULL. This is not only undocumented, but also unintuitive. Fix it by initializing *root inside mnt_table_get_root_fs. Signed-off-by: Karel Zak <kzak@redhat.com>
* su: don't use kill(0, ...) when propagate signalKarel Zak2014-02-171-1/+1
| | | | | | | | | | | The current code uses kill(0, caught_signal) after regular signal cleanup and before exit (all just to make shells happy). Unfortunately, kill(0, ...) is a bad idea. It seems better to use kill(getpid(), ...) otherwise we kill our parent process too. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1063887 Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: make the mountinfo parser more robustKarel Zak2014-02-171-10/+11
| | | | | | ... sorry, the previous change to the parser was too stupid. Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: accept (deleted) path suffix in mountinfo fileKarel Zak2014-02-173-0/+22
| | | | | Addresses: debian bug #711183 Signed-off-by: Karel Zak <kzak@redhat.com>
* ionice: add the way to specify the target processes with pgid and uidMasatake YAMATO2014-02-172-22/+74
| | | | | | | | | | | | | ioprio_get and ioprio_set system call accept not only process ID but also process group ID(pgid) and user ID(uid) to specify the target process(es). However, ionice command accepts only process ID. With this patch a user can specify the target processes with pgid(-P option) and uid(-u option). [kzak@redhat.com: - tiny cleanup in usage()] Signed-off-by: Masatake YAMATO <yamato@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* fallocate: improve --dig-holesKarel Zak2014-02-172-62/+77
| | | | | | | | | * don't use --length to specify hole size, always use stat.st_blksize * use --offset and --length to specify offset within the file (like another fallocate operations) Signed-off-by: Karel Zak <kzak@redhat.com>
* fallocate: add --verbose, clean up usage()Karel Zak2014-02-143-13/+32
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fallocate: Add "--dig-holes" optionRodrigo Campos2014-02-143-25/+95
| | | | | | | | | | This option tries to detect chunk of '\0's and punch a hole, making the file sparse in-place. [kzak@redhat.com: - fix coding style, use xalloc.h and err.h] Signed-off-by: Rodrigo Campos <rodrigo@sdfg.com.ar> Signed-off-by: Karel Zak <kzak@redhat.com>
* fallocate: Hide #ifdef tricks to call fallocate in a functionRodrigo Campos2014-02-141-15/+28
| | | | | | | | | | | | Future patches will add more calls to fallocate(), so it will be useful to have all these tricks inside a function. The error message when fallocate is not supported is slightly changed: the file name is not printed as a prefix because is not available in the context of the function. Also, to only print one of the two possible errors (as happens when using directly exit()), an else clause was added. Signed-off-by: Rodrigo Campos <rodrigo@sdfg.com.ar>
* fallocate: Clarify that space can also be deallocatedRodrigo Campos2014-02-142-7/+8
| | | | | | | The functionality is already there, with --punch-hole, but the text was for the preallocation case only. Signed-off-by: Rodrigo Campos <rodrigo@sdfg.com.ar>
* scriptreplay: Add --maxdelay option.Jesper Dahl Nyerup2014-02-102-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>
* cal: remove unnecessary static variablesSami Kerola2014-02-101-19/+0Star
| | | | | | Not in use since commit 95f4adde867492563167b11ba94dba67f93809aa. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* renice: correct max priority in renice man pagePhillip Susi2014-02-101-7/+3Star
| | | | | | | | | | | | 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>
* mount: remove obsolete and confusing statement from mount.8Phillip Susi2014-02-101-2/+1Star
| | | | | | | 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>
* fix mkfs --verbose and man pagePhillip Susi2014-02-102-6/+2Star
| | | | | | | | | 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>
* hwclock: internationalizing the message of the used interfaceBenno Schulenberg2014-02-104-4/+4
| | | | | | In addition, do it in a single sentence instead of in two fragments. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* getopt.1: The usual doc dir is /usr/share/doc, not .../docsVille Skyttä2014-02-101-1/+1
| | | | Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
* setpriv: Fix --apparmor-profileAndy Lutomirski2014-02-101-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>
* last: make session gone determination more robustSami Kerola2014-02-101-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>
* hexdump: add highlighting supportOndrej Oprala2014-02-1035-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>
* lib/color: add colorscheme parserKarel Zak2014-02-102-2/+48
|
* Merge branch 'master' of https://github.com/micha137/util-linuxKarel Zak2014-02-101-1/+1
|\
| * ionice: Fix output for case ioclass==0Michael Bunk2014-01-151-1/+1
| | | | | | | | output "none" instead of "unknown"
* | lsblk: add PARTTYPE tagMichael Marineau2014-02-101-0/+13
| | | | | | | | To stay in sync with blkid add PARTTYPE as an available output column.
* | tests: automatic whitespace trimming broke earlier commitSami Kerola2014-02-060-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>
* | tests: cal(1) is year is limited to signed 32 bit valueSami Kerola2014-02-064-369/+355Star
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>