Karel Zak [Fri, 30 May 2014 10:01:27 +0000 (12:01 +0200)]
Merge branch 'lscpu-detect-v3' of https://github.com/rudimeier/util-linux
* 'lscpu-detect-v3' of https://github.com/rudimeier/util-linux:
lscpu: improve vmware detection
tests: add lscpu IBM pSeries test data
lscpu: detect OS/400 and pHyp hypervisors
tests: add vbox lscpu dump
lscpu: minor cleanup and improve hypervisor detection
Ruediger Meier [Thu, 29 May 2014 23:18:09 +0000 (01:18 +0200)]
build: fix some compiler warnings
Most of them catched on 32bit gcc and icc.
disk-utils/fsck.cramfs.c: printf format type
lib/boottime.c: unused variables
misc-utils/cal.c: set but never used
sys-utils/losetup.c: set but never used
sys-utils/lscpu-dmi.c: defined but not used
sys-utils/switch_root.c: comparison between signed and unsigned
tests/helpers/test_sysinfo.c: printf format type
Ruediger Meier [Tue, 20 May 2014 11:26:48 +0000 (11:26 +0000)]
lscpu: detect OS/400 and pHyp hypervisors
This patch comes originally from openSUSE / SLE. Author was probably
Petr Uzel.
Internal SUSE references: fate310255, sr226509
In comparison to the original patch we have slightly corrected iSeries
and pSeries detection according to Alexander Graf's comments on
util-linux@vger.kernel.org. Maybe we would need to add some more code
to detect pSeries emulated by Qemu/KVM.
CC: Stanislav Brabec <sbrabec@suse.cz> CC: Petr Uzel <petr.uzel@suse.cz> CC: Alexander Graf <agraf@suse.de> Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Karel Zak [Thu, 29 May 2014 10:48:40 +0000 (12:48 +0200)]
lslogins: clean up password hash check
* rename to PWD-* column names
* add PWD-DENY for accounts where is no possible to login by password
* PWD-LOCK (was LOCKED) checks for valid but locked pawwords
* LOGIN renamed to USER
Karel Zak [Thu, 29 May 2014 09:37:15 +0000 (11:37 +0200)]
lslogins: remove --sort-by-name
If we really need a sort functionality hardcoded into lslogins(1) then we need
a generic sort options (like for lsblk,--sort <column>).
Note that it seems that "lslogins | sort --key <col>" is good enough for now as
lslogins(1) does not convert any data to human readable non-precise format (like
for example lsblk SIZE column etc.).
Karel Zak [Wed, 28 May 2014 07:37:41 +0000 (09:37 +0200)]
Merge branch 'tests-stuff' of https://github.com/rudimeier/util-linux
* 'tests-stuff' of https://github.com/rudimeier/util-linux:
tests: split off losetup scsi_debug part
tests: fix, typo schedutils/cpuset
tests: run tests in deterministic order
tests: ts_scsi_debug_init skip instead of die
Stanislav Brabec [Tue, 27 May 2014 18:38:17 +0000 (20:38 +0200)]
losetup: don't ignore EBUSY in losetup when the loop device is given
losetup ignores the EBUSY error. In the loop fo A_CREATE action, it skips
the error handling when errno = EBUSY. It's OK for the case where no loop
device is specified, but the error has to be handled when the device is given
explicitly.
Author: Takashi Iwai <tiwai@suse.de> Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Stanislav Brabec [Tue, 27 May 2014 18:38:10 +0000 (20:38 +0200)]
losetup: don't clear FD at EBUSY error in loopcxt_setup_device()
loopback lib clears the existing FD unconditionally at error in
loopcxt_setup_device(). This is done even after EBUSY, thus the second call
actually clears the previous setup wrongly.
Author: Takashi Iwai <tiwai@suse.de> Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Petr Uzel [Mon, 26 May 2014 16:28:03 +0000 (18:28 +0200)]
sfdisk: suppress Linux-irrelevant warnings with -L
Sfdisk prints out a warning about extended partition not
starting at a cylinder boundary. Since this is irrelevant
for linux, the -L option should suppress this warning.
Ruediger Meier [Wed, 21 May 2014 23:37:17 +0000 (01:37 +0200)]
tests: ts_scsi_debug_init skip instead of die
If any of these modprobe commands fails then it's not a broken test.
ALso ts_die often does not work correctly from subtests which should
be fixed someday too.
BTW modprobe dry-run (even the real modprobe) is not reliable.
Moreover now we respect blacklisted modules (-b).
This error handling is not only useful to let the test-suite succeed
on broken systems but also to not fail all "scsi_debug tests" after
just one of them failed to umount something.
Sami Kerola [Sat, 24 May 2014 16:38:49 +0000 (17:38 +0100)]
uuidd: ensure pid file is wrote when it is requested
Earlier for example this 'uuidd --pid /dev/full' worked, now error is
printed about truncating not being possible for character device and
assuming someone would write pid to full disk it should not be go by
unnoticed.
Ruediger Meier [Tue, 20 May 2014 10:23:33 +0000 (10:23 +0000)]
libblkid: detect squashfs 3 vs 4
Detect squashfs version <= 3 as squashfs3 and version >= 4 as squashfs.
squashfs kernel module version 4.0 (kernel 2.6.29) is not backward
compatible to open squashfs created with previous versions.
Also fixed version number parsing, see
$ mkdir test
$ mksquashfs test test.sqsh
$ blkid -p test.sqsh
- test.sqsh: VERSION="1024.0" TYPE="squashfs" USAGE="filesystem"
+ test.sqsh: VERSION="4.0" TYPE="squashfs" USAGE="filesystem"
This patch comes from openSUSE / SLE. Original author was probably
Miklos Szeredi.
Internal SUSE references: bnc#666893, sr226509
Ruediger Meier [Thu, 22 May 2014 07:19:08 +0000 (09:19 +0200)]
setarch: flush output streams before exec
This fixes the following (non-deterministic) discrepancy:
$ setarch x86_64 -RFZLvXBIST3 --uname-2.6 echo success
Switching on READ_IMPLIES_EXEC.
Switching on ADDR_LIMIT_32BIT.
Switching on SHORT_INODE.
Switching on WHOLE_SECONDS.
Switching on STICKY_TIMEOUTS.
Switching on ADDR_LIMIT_3GB.
Switching on UNAME26.
success
Karel Zak [Tue, 20 May 2014 13:08:08 +0000 (15:08 +0200)]
lsblk: add --sort <column>
This implementation allow to sort output by arbitrary output column.
Note that output is always converted to human readable strings, but
sort functions in many cases work with original data (stored as
private data to cells by scols_cell_set_userdata()).
Karel Zak [Tue, 20 May 2014 13:04:11 +0000 (15:04 +0200)]
libsmartcols: add scols_sort_table()
* add pointer to column cmp() function [scols_column_set_cmpfunc()]
* allow to store per-cell application private data
(to make it possible to sort tables on data independent on cell
output data) [scols_cell_set_userdata() ...]
* make it possible to access line cell by column
[scols_line_get_column_cell()]
Sort and cmp() stuff based on patches from Shakur Shams Mullick.
Co-Author: Shakur Shams Mullick <shakursmullick@gmail.com> Signed-off-by: Shakur Shams Mullick <shakursmullick@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 20 May 2014 09:44:26 +0000 (11:44 +0200)]
Merge branch '2014wk19' of git://github.com/kerolasa/lelux-utiliteetit
* '2014wk19' of git://github.com/kerolasa/lelux-utiliteetit:
setterm: remove ulcolor and hbcolor duplicates
setterm: add set_blanking() action
setterm: mark some options to be exclusive with each other
setterm: various visual terminal effects are not console specific
setterm: improve error messages
setterm: tell user when options does not effect
setterm: improve perform_sequence() coding style
setterm: correct usage() bright color argument
setterm: make -msglevel 0 to work as is did earlier
setterm: remove devfs and /dev/vcsa0 support
setterm: clean up screendump()
setterm: add init_terminal() to make main() shorter
setterm: add option control structure
setterm: remove usage comment segment
setterm: move show_tabs() and screendump() functions
setterm: use string utils to numeric parsing
setterm: recommend long options with double hyphen
setterm: use getopt_long_only() for option parsing
setterm: clean up includes
Karel Zak [Tue, 20 May 2014 08:23:18 +0000 (10:23 +0200)]
Merge branch 'cramfs-blocksize' of https://github.com/rudimeier/util-linux
* 'cramfs-blocksize' of https://github.com/rudimeier/util-linux:
mkfs.cramfs: fix crash when -b 0
fsck.cramfs: update man page (--extract and --blocksize)
tests: remove test_fsck.cramfs (reverts 6c32ae78)
fsck.cramfs: remove define INCLUDE_FS_TESTS
fsck.cramfs: refactor option -x/--extract
tests: fix fsck.cramfs for systems with certain page sizes
fsck.cramfs: add option --blocksize
fsck.cramfs: rename variable page_size to blksize
fsck.cramfs: ifdef unused outbuffer and page_size
fsck.cramfs: allow smaller superblock sizes
tests, fix cramfs for systems with certain page sizes