summaryrefslogtreecommitdiffstats
path: root/sys-utils
Commit message (Collapse)AuthorAgeFilesLines
* mount: fix tiny typo in man pageStephan Müller2014-05-191-1/+1
| | | | | | adjust command to use /dev/loop3 as described in text Signed-off-by: Stephan Mueller <fruktopus@gmail.com>
* lslogins: move to login-utilsOndrej Oprala2014-05-153-511/+0Star
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* lslogins(1): skeleton and argparsing for a new utilityOndrej Oprala2014-05-153-0/+511
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* dmesg: support colors customizationKarel Zak2014-05-132-34/+81
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* losetup: return EXIT_FAILURE on unsuccessful -fKarel Zak2014-05-131-1/+2
| | | | | Reported-by: Ruediger Meier <sweet_f_a@gmx.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* cytune: remove from util-linuxSami Kerola2014-05-124-678/+0Star
| | | | | | | | | | | Assumption is there are not many who need this tool. Whom ever they might be the recommendation is to use the command from old util-linux release. Second reason to removal is difficulty to test hardware specific command when none of the active project members does not seem to have such. Basically the command has reached dead end what comes to maintainability of it. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* lib/timeutils: remove get_boot_time from libcommonKarel Zak2014-05-062-1/+2
| | | | | | | | clock_gettime() needs -lrt, so let's keep this stuff outside libcommon.la Reported-by: Ruediger Meier <sweet_f_a@gmx.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* hwclock: fix typoKarel Zak2014-05-061-5/+4Star
| | | | | Reported-by: Stanislav Brabec <sbrabec@suse.cz> Signed-off-by: Karel Zak <kzak@redhat.com>
* hwclock: Check drift value in /etc/adjtimeStanislav Brabec2014-05-061-0/+4
| | | | | | | | Due to bug in older versions of hwclock, /etc/adjtime can contain excessive drift value (up to many years per day). Prevent it from applying. Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
* hwclock: Prevent excessive drift valuesStanislav Brabec2014-05-061-10/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Failure of CMOS battery can cause writing of excessive drift values (up to many years per day). This causes excessive hwclock adjustment next time, which may lead to overflow in calculate_adjustment() (and hang before 4a44a54b). Prevent this situation, check drift for limits and reset drift to zero instead. Steps to reproduce: mv /etc/adjtime /etc/adjtime.backup rm /etc/adjtime hwclock --set --date 2001-01-01\ 01:00:00 changing of /etc/adjtime. mv /etc/adjtime /etc/adjtime.saved hwclock --set --date 2001-01-02\ 01:00:01 mv /etc/adjtime.saved /etc/adjtime echo "======= The /etc/adjtime has a \"correct\" look:" cat /etc/adjtime hwclock --debug --systohc --utc echo "======= The /etc/adjtime now has deeply failed drift value:" cat /etc/adjtime mv /etc/adjtime /etc/adjtime.saved hwclock --set --date 2015-01-01\ 01:00:00 mv /etc/adjtime.saved /etc/adjtime hwclock --debug --adjust echo "======= And the last /etc/adjtime:" cat /etc/adjtime mv /etc/adjtime.backup /etc/adjtime hwclock --systohc --utc Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
* setpriv: Fix --selinux-labelAndy Lutomirski2014-05-061-2/+2
| | | | | | | | | | | | | | | | | This commit: commit 05cef8eafbf169a8da1d2831f5ed3d5b1b81aaad Author: Sami Kerola <kerolasa@iki.fi> Date: Sat Apr 13 20:54:59 2013 +0100 setpriv: check writing to a file descriptor was successful broke --selinux-label. It checks whether fsyncing /proc/self/attr/exec succeeds, and it doesn't, because fsync isn't supported on that file. I have stealthily improved the error message as part of this fix. Signed-off-by: Andy Lutomirski <luto@amacapital.net>
* textual: remove square brackets from around three dotsBenno Schulenberg2014-05-064-19/+19
| | | | | | Also improve some option descriptions here and there. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* ipcs: do not gettextize wordless stringsBenno Schulenberg2014-05-061-5/+5
| | | | | | Also tweak a few parts of the usage message. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* dmesg: add missing includeKarel Zak2014-05-061-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* swapon, swapheader, mkswap: move swap signature to headerSami Kerola2014-05-061-3/+0Star
| | | | | | | | | | Both swapon and mkswap need to know what is valid device signature, so share the value. [kzak@redhat.com: - use SWAP_SIGNATURE_SZ properly in write_signature()] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* swapon: swaps with legacy version label are not supportedSami Kerola2014-05-061-2/+1Star
| | | | | Reviewed-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mkswap, swaplabel: move version number to headerSami Kerola2014-05-041-6/+4Star
| | | | | | | Corrently only the swap version 1 is supported, which is a magic value so move it to header. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* dmesg: move get_boot_time() to lib/timeutilsSami Kerola2014-05-041-27/+0Star
| | | | | | In future the last(1) will use get_boot_time() as well. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mount: note that -c unused for mount.<type> in man pageKarel Zak2014-04-252-5/+12
| | | | | Addresses: https://github.com/karelzak/util-linux/issues/70 Signed-off-by: Karel Zak <kzak@redhat.com>
* Revert "dmesg: don't use brow/yellow in output"Karel Zak2014-04-231-1/+1
| | | | | | | | It will be better to support colors customization than use ugly blue color. BTW, for example git-log uses brow/yellow too by default. This reverts commit 0b6fbc25990d9498956e06bfcf699fca094e24a9.
* nsenter: add + to getopt_long()Karel Zak2014-04-181-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* unshare: add + to getopt_long()Karel Zak2014-04-181-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fallocate: add FALLOC_FL_ZERO_RANGE supportLukas Czerner2014-04-182-6/+33
| | | | | | | | Recent Linux kernel supports FALLOC_FL_ZERO_RANGE in fallocate(2). This patch adds FALLOC_FL_ZERO_RANGE support to fallocate utility, by introducing a new option -z|--zero-range. Signed-off-by: Lukas Czerner <lczerner@redhat.com>
* fallocate: introduce an option -c to support COLLAPSE_RANGEDongsu Park2014-04-182-17/+35
| | | | | | | | | | | | Introduce a new option -c (or --collapse-range) to support a new flag FALLOC_FL_COLLAPSE_RANGE for fallocate(2). It will nullify a particular range [offset, offset+len] by shifting extents beyond the range to the beginning of the hole. Cc: Lukas Czerner <lczerner@redhat.com> Cc: Namjae Jeon <namjae.jeon@samsung.com> Cc: Ashish Sangwan <a.sangwan@samsung.com> Signed-off-by: Dongsu Park <dongsu.park@profitbricks.com>
* fstrim: add hint to man pageKarel Zak2014-04-101-0/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fstrim: daily -> weekly in systemd timerKarel Zak2014-04-101-2/+3
| | | | | | | * add link to fstrimg man page * less aggressive frequency Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: consolidate systemd supportKarel Zak2014-04-091-1/+1
| | | | | | | | | | | | | | | * systemd (since v209) uses only one library (when compiled without --enable-compat-libs) * all systemd build-sys stuff is merged into HAVE_SYSTEMD (automake) and HAVE_LIBSYSTEMD (C macro) now * all is controlled by --with-systemd, default is to automatically check for systemd libs * no more --enable-socket-activation and --enable-journald Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: fix fstrim systemd stuffKarel Zak2014-04-081-4/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* setarch: Fix ppc64le architecturesAnton Blanchard2014-04-071-0/+6
| | | | | | | setarch currently fails on ppc64le because it tries to use big endian architecture names. Fix it. Signed-off-by: Anton Blanchard <anton@samba.org>
* umount: fix typo in usageJonathan Liu2014-04-071-1/+1
| | | | Signed-off-by: Jonathan Liu <net147@gmail.com>
* fstrim: add systemd unitsThomas Bächler2014-04-074-0/+23
| | | | | | | | This adds a timer and a service for systemd that runs fstrim -a once a day. The Persistent=true option used will only work on systemd 212 or newer.
* mount.8: Some typographical and prefix corrections to the manualBjarni Ingi Gislason2014-04-071-195/+199
| | | | | | | | | | | | | | | | | | | | | I forgot to add the patch to the attachment. Additional changes to "Changes:" " \(em " changed to " \(en ", as the em-dash with a word space on each side is to long (troff) ".na/.ad" is not used but .nf/.fi for a long command line and it is split into two lines Word "illegal" is changed to "invalid" Word "hyphen-separated" is changed to '"hyphen-minus"-separated' as the meaning is the code and not the glyph (on the command line) (beware of UTF-8) -- Bjarni I. Gislason
* mount: apply "nofail" to MNT_ERR_NOSOURCE libmount errorKarel Zak2014-04-071-0/+2
| | | | | | | | | | | | | fstab: UUID=nonexist /mnt/nonexist1 ext4 nofail 0 1 # mount -av mount: can't find UUID=nonexist .. this is bug of course. Reported-by: Patrick McLean <chutzpah@gentoo.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* umount: more robust success message for --allKarel Zak2014-04-071-2/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: fix --all and nofail return codeKarel Zak2014-04-071-4/+6
| | | | | | | | | Now the "nofail" affects warnings warning messages only. That's wrong and regression (against original non-libmount version). The nofail has to control return code too. Reported-by: Patrick McLean <chutzpah@gentoo.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* switch_root: verify initramfs by f_type, not devnoDave Reisner2014-04-041-6/+8
| | | | | | | | As of linux 3.14, the initramfs device will have both major and minor 0, causing our paranoia check to fail. Make this version agnostic by checking the filesystem type, rather than a device number. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* libsmartcols: clean up flags usageKarel Zak2014-04-035-13/+13
| | | | | | | | | * rename flags functions to scols_table_enable_* * rename *_no_foo() functions to _nofoo() * output formats are mutually exclusive, so don't use flags there * don't assume symbols in scols_new_table(), use scols_table_set_symbols() Signed-off-by: Karel Zak <kzak@redhat.com>
* wdctl: clean up scols usageKarel Zak2014-04-031-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* swapon: clean up scols usageKarel Zak2014-04-031-19/+11Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* prlimit: clean up scols usageKarel Zak2014-04-031-14/+8Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lscpu: clean up scols usageKarel Zak2014-04-031-9/+8Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* losetup: tiny change to usage()Karel Zak2014-04-032-3/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* losetup: clean up scols usageKarel Zak2014-04-031-68/+58Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* wdctl: use libsmartcolsOndrej Oprala2014-04-032-23/+32
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* swapon: use libsmartcolsOndrej Oprala2014-04-032-25/+32
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* prlimit: use libsmartcolsOndrej Oprala2014-04-032-25/+33
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* lscpu: use libsmartcolsOndrej Oprala2014-04-032-10/+18
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* losetup: use libsmartcolsOndrej Oprala2014-04-032-38/+49
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* mount: update mount.8 about barrier mount options defaultsRuediger Meier2014-04-011-21/+16Star
| | | | | | | | This patch comes originally from Jan Kara <jack@suse.cz> and updates the default behaviour of the kernel which has been changed some years ago. See kernel docs Documentation/filesystems/ext3.txt Documentation/filesystems/ext4.txt
* dmesg: don't use brow/yellow in outputKarel Zak2014-04-011-1/+1
| | | | | | | The color used for subsystem prefix is useless on while background. Let's use blue. Signed-off-by: Karel Zak <kzak@redhat.com>