]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
9 years agochrt: make man page more structured
Karel Zak [Wed, 20 Jan 2016 13:30:52 +0000 (14:30 +0100)] 
chrt: make man page more structured

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agochrt: add support for SCHED_DEADLINE
Karel Zak [Wed, 20 Jan 2016 13:04:32 +0000 (14:04 +0100)] 
chrt: add support for SCHED_DEADLINE

This patch introduces

-d, --deadline
-T, --sched-runtime
-D, --sched-deadline
-P, --sched-period

command line options. The functionality is available only for Linux with
sched_setattr() [kernel >=3.14]

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agochrt: use sched_setattr() if available
Karel Zak [Wed, 20 Jan 2016 11:44:27 +0000 (12:44 +0100)] 
chrt: use sched_setattr() if available

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agochrt: make usage more readable
Karel Zak [Tue, 19 Jan 2016 13:52:51 +0000 (14:52 +0100)] 
chrt: make usage more readable

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agochrt: set function refactoring
Karel Zak [Tue, 19 Jan 2016 13:46:30 +0000 (14:46 +0100)] 
chrt: set function refactoring

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agochrt: output function refactoring
Karel Zak [Tue, 19 Jan 2016 13:38:18 +0000 (14:38 +0100)] 
chrt: output function refactoring

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agochrt: add control struct
Karel Zak [Tue, 19 Jan 2016 13:24:53 +0000 (14:24 +0100)] 
chrt: add control struct

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agotests: remove redundant check for NULL [cppcheck]
Boris Egorov [Tue, 19 Jan 2016 06:18:21 +0000 (12:18 +0600)] 
tests: remove redundant check for NULL [cppcheck]

We set SA_SIGINFO flag, so we should not get NULL.

[tests/helpers/test_sigreceive.c:45] -> [tests/helpers/test_sigreceive.c:47]: (warning) Either the condition 'if(info)' is redundant or there is possible null pointer dereference: info.

9 years agohwclock: fix format specifier [cppcheck]
Boris Egorov [Tue, 19 Jan 2016 06:16:41 +0000 (12:16 +0600)] 
hwclock: fix format specifier [cppcheck]

[sys-utils/hwclock-rtc.c:435]: (warning) %ld in format string (no. 1) requires 'long' but the argument type is 'unsigned long'.

9 years agolibblkid: check limits before indexing array [cppcheck]
Boris Egorov [Tue, 19 Jan 2016 06:16:03 +0000 (12:16 +0600)] 
libblkid: check limits before indexing array [cppcheck]

[libblkid/src/encode.c:165]: (style) Array index 'i' is used before limits check.

9 years agoreadprofile: add scanf field width limits [cppcheck]
Boris Egorov [Tue, 19 Jan 2016 05:45:15 +0000 (11:45 +0600)] 
readprofile: add scanf field width limits [cppcheck]

[sys-utils/readprofile.c:301]: (warning) scanf without field width limits can crash with huge input data.
[sys-utils/readprofile.c:322]: (warning) scanf without field width limits can crash with huge input data.

9 years agolibblkid,libmount: Do not use void* in calculations [cppcheck]
Boris Egorov [Tue, 19 Jan 2016 05:42:26 +0000 (11:42 +0600)] 
libblkid,libmount: Do not use void* in calculations [cppcheck]

[libblkid/src/superblocks/zfs.c:179]: (portability) 'label' is of type 'const void *'. When using void pointers in calculations, the behaviour is undefined.
[libblkid/src/superblocks/zfs.c:237]: (portability) 'label' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined.
[libblkid/src/topology/topology.c:221]: (portability) 'chn.data' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined.
[libmount/src/fs.c:153]: (portability) 'old' is of type 'const void *'. When using void pointers in calculations, the behaviour is undefined.
[libmount/src/fs.c:154]: (portability) 'new' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined.

9 years agolibblkid: (zfs) add cast to fix UB [cppcheck]
Boris Egorov [Tue, 19 Jan 2016 05:37:57 +0000 (11:37 +0600)] 
libblkid: (zfs) add cast to fix UB [cppcheck]

[libblkid/src/superblocks/zfs.c:173]: (error) Shifting 32-bit value by 56 bits is undefined behaviour
[libblkid/src/superblocks/zfs.c:173]: (error) Shifting 32-bit value by 40 bits is undefined behaviour

9 years agolibblkid: make minix prober more robust
Karel Zak [Mon, 18 Jan 2016 13:35:33 +0000 (14:35 +0100)] 
libblkid: make minix prober more robust

It seems that the current minix probing code is not robust enough and
it returns false positive for Fedora f24 install images. The crazy thing
is that the image pass also all Linux kernel minix_fill_super() checks
and mount(2) fails later when it tries to read filesystem root
directory.

The fsck.minix requires sb->s_log_zone_size to be zero (Linux kernel
does not care about it), let's use the same requirement for libblkid.

Note, it would be possible to check minix root directory inode in
libblkid, but this solution requires minix prober specific seek &
read. We want to avoid extra read operations...

References: https://bugzilla.redhat.com/show_bug.cgi?id=1299255
Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolibsmartcols: don't sort if cmpfunc() is not set
Karel Zak [Mon, 18 Jan 2016 09:47:22 +0000 (10:47 +0100)] 
libsmartcols: don't sort if cmpfunc() is not set

Reported-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
9 years agolibsmartcols: be sure column is unused
Karel Zak [Mon, 18 Jan 2016 09:36:31 +0000 (10:36 +0100)] 
libsmartcols: be sure column is unused

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agoMerge branch 'gh/254' of https://github.com/ignatenkobrain/util-linux
Karel Zak [Mon, 18 Jan 2016 09:24:39 +0000 (10:24 +0100)] 
Merge branch 'gh/254' of https://github.com/ignatenkobrain/util-linux

9 years agoMerge branch 'sym_is_hidden' of https://github.com/ignatenkobrain/util-linux
Karel Zak [Mon, 18 Jan 2016 09:16:36 +0000 (10:16 +0100)] 
Merge branch 'sym_is_hidden' of https://github.com/ignatenkobrain/util-linux

* 'sym_is_hidden' of https://github.com/ignatenkobrain/util-linux:
  libsmartcols: add scols_column_is_hidden into sym file

9 years agolsns: fix failure after zombie process
Yuriy M. Kaminskiy [Fri, 15 Jan 2016 21:38:00 +0000 (00:38 +0300)] 
lsns: fix failure after zombie process

(At least on kernel 3.16), stat("/proc/${pid_of_zombie}/ns/mnt") returns
-ENOENT, as a result lsns stops scanning processes prematurely.

9 years agoAUTHORS: add Igor Gnatenko
Igor Gnatenko [Sat, 16 Jan 2016 21:52:43 +0000 (22:52 +0100)] 
AUTHORS: add Igor Gnatenko

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
9 years agolibsmartcols: reflect changinging SCOLS_FL_TREE after adding to table
Igor Gnatenko [Sat, 16 Jan 2016 21:51:52 +0000 (22:51 +0100)] 
libsmartcols: reflect changinging SCOLS_FL_TREE after adding to table

When scols_column_set_flags() is called we will compare before & after
status of SCOLS_FL_TREE flag and appropriately handle tb->ntreecols.

Reference: https://github.com/karelzak/util-linux/issues/254
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
9 years agolibsmartcols: add scols_column_is_hidden into sym file
Igor Gnatenko [Fri, 15 Jan 2016 22:26:26 +0000 (23:26 +0100)] 
libsmartcols: add scols_column_is_hidden into sym file

In commit 6d6b6d185e7427e2b5590349edd76d019b0fe920 we forgot to
add this function to sym file and now we are getting
undefined symbol: scols_column_is_hidden

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
9 years agofstrim: add reference to blkdiscard
Karel Zak [Wed, 13 Jan 2016 12:20:43 +0000 (13:20 +0100)] 
fstrim: add reference to blkdiscard

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agocolumn: ignore non-printable chars
Karel Zak [Wed, 13 Jan 2016 09:08:39 +0000 (10:08 +0100)] 
column: ignore non-printable chars

echo -e '\033[33mb\033[mXFoo\n\033[33mbar\033[mXFoo' | column -s X -t

old version:

b   Foo
bar   Foo

fixed version:

b    Foo
bar  Foo

References: https://github.com/karelzak/util-linux/issues/252
Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolib/mbsalign: fix warnings when compile without widechars
Karel Zak [Wed, 13 Jan 2016 09:08:13 +0000 (10:08 +0100)] 
lib/mbsalign: fix warnings when compile without widechars

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolibblkid: use internally uint64_t for offsets and sizes
Karel Zak [Tue, 12 Jan 2016 17:42:02 +0000 (18:42 +0100)] 
libblkid: use internally uint64_t for offsets and sizes

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolsblk: use unsigned type for SIZE
Karel Zak [Tue, 12 Jan 2016 15:00:57 +0000 (16:00 +0100)] 
lsblk: use unsigned type for SIZE

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolibsmartcols: allow to set data by reference to libscols_column
Karel Zak [Tue, 12 Jan 2016 10:39:03 +0000 (11:39 +0100)] 
libsmartcols: allow to set data by reference to libscols_column

References: https://github.com/karelzak/util-linux/issues/251
Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolibfdisk: Add GPT type GUID for Itanium Linux root
Andrew Wilcox [Tue, 12 Jan 2016 09:35:11 +0000 (10:35 +0100)] 
libfdisk: Add GPT type GUID for Itanium Linux root

References: http://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/
Signed-off-by: Andrew Wilcox <awilfox@adelielinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agofstrim: systemd timer units should be WantedBy=timers.target
Peter Hoeg [Thu, 7 Jan 2016 02:16:02 +0000 (10:16 +0800)] 
fstrim: systemd timer units should be WantedBy=timers.target

[kzak@redhat.com: - this configuration is recommended by systemd docs]

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolibsmartcols: make output buffer size estimation more robust and elegant
Karel Zak [Thu, 7 Jan 2016 16:29:11 +0000 (17:29 +0100)] 
libsmartcols: make output buffer size estimation more robust and elegant

Reported-by: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agohwclock: change audit message
Karel Zak [Thu, 7 Jan 2016 12:23:24 +0000 (13:23 +0100)] 
hwclock: change audit message

The preferred layout is name=value for audit messages.

References: https://bugzilla.redhat.com/show_bug.cgi?id=1296278
Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agoscriptreplay/newgrp: use signed int to store return of getopt_long
Filipe Brandenburger [Wed, 6 Jan 2016 19:00:49 +0000 (11:00 -0800)] 
scriptreplay/newgrp: use signed int to store return of getopt_long

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
9 years agolib/tty: Pass default width to get_terminal_width()
Boris Egorov [Tue, 5 Jan 2016 16:17:58 +0000 (22:17 +0600)] 
lib/tty: Pass default width to get_terminal_width()

Almost any code calling get_terminal_width() checks returned width for
non-positive values and sets it to some default value (say, 80). So,
let's pass this default value directly to the function.

[kzak@redhat.com: - get_terminal_width() refactoring]

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agomount.8: Add documentation of overlay mount options
Osamu Aoki [Sat, 26 Dec 2015 03:57:08 +0000 (12:57 +0900)] 
mount.8: Add documentation of overlay mount options

[kzak@redhat.com: - add more information, change formatting]

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agotests: fallback for missing TS_DESC
Karel Zak [Tue, 5 Jan 2016 11:31:32 +0000 (12:31 +0100)] 
tests: fallback for missing TS_DESC

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agotests: wipefs fix, ts_init was called too late
Ruediger Meier [Thu, 17 Dec 2015 15:56:14 +0000 (16:56 +0100)] 
tests: wipefs fix, ts_init was called too late

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
9 years agotests: fix run.sh --parallel=1
Ruediger Meier [Tue, 15 Dec 2015 17:26:04 +0000 (18:26 +0100)] 
tests: fix run.sh --parallel=1

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
9 years agotests: always create sparse image files
Ruediger Meier [Tue, 15 Dec 2015 16:46:58 +0000 (17:46 +0100)] 
tests: always create sparse image files

This saves about 400M disk I/O and space.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
9 years agotests: no more sleep, udevadm settle only
Ruediger Meier [Tue, 15 Dec 2015 15:43:29 +0000 (16:43 +0100)] 
tests: no more sleep, udevadm settle only

This seems to work nowadays and saves 37s.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
9 years agotests: use sfdisk --no-reread wherever it's needed
Ruediger Meier [Tue, 15 Dec 2015 13:03:23 +0000 (14:03 +0100)] 
tests: use sfdisk --no-reread wherever it's needed

The first BLKRRPART ioctl causes udev events and then second one may
fail, see Discussion
http://comments.gmane.org/gmane.linux.utilities.util-linux-ng/11885

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
9 years agolsns: Fix "lowers" -> "lowest" typo in --help for COL_PID
W. Trevor King [Tue, 15 Dec 2015 19:46:25 +0000 (11:46 -0800)] 
lsns: Fix "lowers" -> "lowest" typo in --help for COL_PID

The process-selection logic is in add_process_to_namespace:

  if (!ns->proc || ns->proc->pid > proc->pid)
    ns->proc = proc;

so it's just selecting the lowest PID.

Signed-off-by: W. Trevor King <wking@tremily.us>
9 years agolslogins: fix getgrouplist() usage for 64BE
Karel Zak [Mon, 21 Dec 2015 14:50:58 +0000 (15:50 +0100)] 
lslogins: fix getgrouplist() usage for 64BE

on ppc64:
 $ lslogins kzak
 $ lslogins: cannot allocate 85899345920 bytes: Cannot allocate memory

because

  (int *) len

where len is pointer to size_t is bad idea...

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agotravis: workaround env pollution, PYTHON_CFLAGS
Ruediger Meier [Thu, 17 Dec 2015 13:10:17 +0000 (14:10 +0100)] 
travis: workaround env pollution, PYTHON_CFLAGS

Since a few days travis workers seem to export broken PYTHON_CFLAGS
and automake's python detection fails.

see https://github.com/travis-ci/travis-ci/issues/5301

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
9 years agotravis: cosmetics, order scripts like they are executed
Ruediger Meier [Thu, 17 Dec 2015 13:04:57 +0000 (14:04 +0100)] 
travis: cosmetics, order scripts like they are executed

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
9 years agoMerge branch 'scols_print_to_string' of https://github.com/ignatenkobrain/util-linux
Karel Zak [Tue, 15 Dec 2015 11:48:30 +0000 (12:48 +0100)] 
Merge branch 'scols_print_to_string' of https://github.com/ignatenkobrain/util-linux

9 years agologin, mount: fix __SC_GETPW_R_SIZE_MAX usage
Karel Zak [Tue, 15 Dec 2015 11:25:56 +0000 (12:25 +0100)] 
login, mount: fix __SC_GETPW_R_SIZE_MAX usage

sysconf(_SC_GETPW_R_SIZE_MAX) returns initial suggested size for pwd
buffer (see getpwnam_r man page or POSIX). This is not large enough in
some cases.

Yes, this sysconf option is misnamed (should be _SC_GETPW_R_SIZE_MIN).

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agoMerge branch 'test-fixes' of https://github.com/rudimeier/util-linux
Karel Zak [Tue, 15 Dec 2015 09:55:49 +0000 (10:55 +0100)] 
Merge branch 'test-fixes' of https://github.com/rudimeier/util-linux

* 'test-fixes' of https://github.com/rudimeier/util-linux:
  tests: sfdisk/gpt-reorder, add missing results
  tests: skip nonroot before checking for progs in PATH
  tests: skip automake's empty "Testsuite summary"

9 years agoscols/table_print: restore old stream after printing to str
Igor Gnatenko [Sun, 13 Dec 2015 14:02:05 +0000 (15:02 +0100)] 
scols/table_print: restore old stream after printing to str

Reference: https://github.com/karelzak/util-linux/issues/240
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
9 years agowipefs: Allow b to be used as the short option for backup
Bill Pemberton [Thu, 10 Dec 2015 15:02:34 +0000 (10:02 -0500)] 
wipefs: Allow b to be used as the short option for backup

'b' is documented as the short option for backup but b was not added
to the optstring on the getopt_long call.  Add it.

Signed-off-by: Bill Pemberton <wfp5p@worldbroken.com>
9 years agotests: sfdisk/gpt-reorder, add missing results
Ruediger Meier [Thu, 10 Dec 2015 17:02:28 +0000 (18:02 +0100)] 
tests: sfdisk/gpt-reorder, add missing results

follow-up 9a17d946

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
9 years agotests: skip nonroot before checking for progs in PATH
Ruediger Meier [Thu, 10 Dec 2015 15:56:11 +0000 (16:56 +0100)] 
tests: skip nonroot before checking for progs in PATH

The least annoying and most useful order is this one:
  1. check for compiled UL commands
  2. check for root
  3. check for loop support
  4. check for external progs

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
9 years agotests: skip automake's empty "Testsuite summary"
Ruediger Meier [Thu, 10 Dec 2015 12:35:27 +0000 (13:35 +0100)] 
tests: skip automake's empty "Testsuite summary"

We have no automake TESTS. Let's run check-local only.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
9 years agolsblk: tiny man page update for --sort
Karel Zak [Thu, 10 Dec 2015 12:06:48 +0000 (13:06 +0100)] 
lsblk: tiny man page update for --sort

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolsblk: allow to --sort by hidden column
Karel Zak [Thu, 10 Dec 2015 12:03:46 +0000 (13:03 +0100)] 
lsblk: allow to --sort by hidden column

For example:

lsblk -o NAME --sort SIZE

prints NAMEs, but sort by SIZEs.

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolibsmartcols: add SCOLS_FL_HIDDEN
Karel Zak [Thu, 10 Dec 2015 12:02:03 +0000 (13:02 +0100)] 
libsmartcols: add SCOLS_FL_HIDDEN

Export "don't print this column" functionality by public API.

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolibmount: add comment, remove TODO item
Karel Zak [Thu, 10 Dec 2015 10:45:31 +0000 (11:45 +0100)] 
libmount: add comment, remove TODO item

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agoMerge branch 'test-fixes' of https://github.com/rudimeier/util-linux
Karel Zak [Thu, 10 Dec 2015 10:18:04 +0000 (11:18 +0100)] 
Merge branch 'test-fixes' of https://github.com/rudimeier/util-linux

* 'test-fixes' of https://github.com/rudimeier/util-linux:
  tests: use xz instead of bzip2 for blkid images
  tests: add some line tests
  tests: avoid sed -E

9 years agotests: skip BLKDISCARD if unsupported
Ruediger Meier [Wed, 9 Dec 2015 15:27:17 +0000 (16:27 +0100)] 
tests: skip BLKDISCARD if unsupported

CC: Federico Simoncelli <fsimonce@redhat.com>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
9 years agotests: blkdiscard, check return values
Ruediger Meier [Wed, 9 Dec 2015 15:12:35 +0000 (16:12 +0100)] 
tests: blkdiscard, check return values

CC: Federico Simoncelli <fsimonce@redhat.com>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
9 years agoblkdiscard: don't report "zero range" at the end
Ruediger Meier [Wed, 9 Dec 2015 12:01:51 +0000 (13:01 +0100)] 
blkdiscard: don't report "zero range" at the end

We want to address the case that we have printed the last useful
stats line already within the loop. Avoiding an additional line
"Discarded 0 bytes ..." at the end.

Note there is a behavior change now for the edge cases "-v -l 0" and
"-v -o blksize" where we don't print any stats line anymore. But actually
it's correct, we never make any BLKDISCARD syscall with zero range.
Perhaps we should return error in these cases to help people who always
want to parse stats output on success.

CC: Federico Simoncelli <fsimonce@redhat.com>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
9 years agoblkdiscard: fix stats reporting (off by one)
Ruediger Meier [Wed, 9 Dec 2015 11:57:43 +0000 (12:57 +0100)] 
blkdiscard: fix stats reporting (off by one)

CC: Federico Simoncelli <fsimonce@redhat.com>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
9 years agoblkdiscard: fix timeval comparison inclusive usecs
Ruediger Meier [Wed, 9 Dec 2015 08:36:14 +0000 (09:36 +0100)] 
blkdiscard: fix timeval comparison inclusive usecs

We will see if this makes our "--step" tests reliable.

CC: Federico Simoncelli <fsimonce@redhat.com>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
9 years agolibmount: use fstatat(AT_NO_AUTOMOUNT) for mountpoints
Karel Zak [Wed, 9 Dec 2015 09:26:16 +0000 (10:26 +0100)] 
libmount: use fstatat(AT_NO_AUTOMOUNT) for mountpoints

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agotests: use xz instead of bzip2 for blkid images
Ruediger Meier [Mon, 7 Dec 2015 16:48:56 +0000 (17:48 +0100)] 
tests: use xz instead of bzip2 for blkid images

xz decompression creates sparse files if possible. This saves about 1G
disk space in build directory and a lot I/O and time.

BTW regarding compatibility ... CentOS 7 is the first system I've met
which does not install bzip2 but xz only by default.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
9 years agolibmount: add cgroup2 pseudo FS
Karel Zak [Tue, 8 Dec 2015 11:16:27 +0000 (12:16 +0100)] 
libmount: add cgroup2 pseudo FS

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agoMerge branch 'patch-1' of https://github.com/frioux/util-linux
Karel Zak [Tue, 8 Dec 2015 11:10:39 +0000 (12:10 +0100)] 
Merge branch 'patch-1' of https://github.com/frioux/util-linux

* 'patch-1' of https://github.com/frioux/util-linux:
  Fix subtle typo

9 years agobuild-sys: fix typo and more all RT to the same place
Karel Zak [Tue, 8 Dec 2015 10:52:13 +0000 (11:52 +0100)] 
build-sys: fix typo and more all RT to the same place

typo : s/timer_createx/timer_create/

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agoFix subtle typo
fREW Schmidt [Mon, 7 Dec 2015 22:16:30 +0000 (14:16 -0800)] 
Fix subtle typo

9 years agolibsmartcols: fix right-aligned logic for last column
Karel Zak [Mon, 7 Dec 2015 14:10:23 +0000 (15:10 +0100)] 
libsmartcols: fix right-aligned logic for last column

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agocfdisk: use new libsmartcols functionality to fix output
Karel Zak [Mon, 7 Dec 2015 11:23:26 +0000 (12:23 +0100)] 
cfdisk: use new libsmartcols functionality to fix output

Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolibsmartcols: don't use fprintf() when count cells
Karel Zak [Mon, 7 Dec 2015 11:22:29 +0000 (12:22 +0100)] 
libsmartcols: don't use fprintf() when count cells

fprintf("%*s") is based on bytes, no cells.

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolibsmartcols: add scols_table_enable_nowrap()
Karel Zak [Mon, 7 Dec 2015 11:03:52 +0000 (12:03 +0100)] 
libsmartcols: add scols_table_enable_nowrap()

This allows to use libsmartcols in ncurses programs without any
additional voodoo.

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agoRevert "cfdisk: make sure that output fits to terminal width"
Karel Zak [Mon, 7 Dec 2015 09:42:15 +0000 (10:42 +0100)] 
Revert "cfdisk: make sure that output fits to terminal width"

This reverts commit ed99eac0e2a83a315c7cf5d8a461df16b3106596.

9 years agolsns: improve formatting and wording of the man page
Benno Schulenberg [Thu, 3 Dec 2015 20:12:28 +0000 (21:12 +0100)] 
lsns: improve formatting and wording of the man page

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
9 years agolibblkid: fix buffers mapping on 32bit archs
Karel Zak [Thu, 3 Dec 2015 11:24:22 +0000 (12:24 +0100)] 
libblkid: fix buffers mapping on 32bit archs

Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agotests: add some line tests
Ruediger Meier [Thu, 3 Dec 2015 00:42:28 +0000 (01:42 +0100)] 
tests: add some line tests

regarding e03f29b6 ...

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
9 years agotests: avoid sed -E
Ruediger Meier [Wed, 2 Dec 2015 14:24:27 +0000 (15:24 +0100)] 
tests: avoid sed -E

GNU sed's -E option for BSD compatibility is relatively new (>=4.2) and
undocumented.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
9 years agoline: keep stdin unbuiffered
Karel Zak [Wed, 2 Dec 2015 14:01:23 +0000 (15:01 +0100)] 
line: keep stdin unbuiffered

 $ printf 'a\nb\n' | echo $(./line) :: $(./line)

broken version:

 a ::

fixed version:

 a :: b

Addresses: https://github.com/karelzak/util-linux/issues/236
Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolibmount: fix is-mounted check for btrfs
Karel Zak [Wed, 2 Dec 2015 12:38:51 +0000 (13:38 +0100)] 
libmount: fix is-mounted check for btrfs

fstab:
  /dev/sdc        /mnt/test       btrfs   subvol=/anydir
  /mnt/test       /mnt/test2      auto    bind

and "mount -a" does not detect that /mnt/test2 is already mounted.

Reported-by: Stanislav Brabec <sbrabec@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolscpu: Print physical cpu information
Sukadev Bhattiprolu [Wed, 25 Nov 2015 20:10:39 +0000 (12:10 -0800)] 
lscpu: Print physical cpu information

lscpu currently prints information for CPUs configured in the system.
In case of KVM or other virtualized guest operating systems, this
refers to the virtual system, and bears no relation to the physical
topology of the system.

It would be useful if lscpu could also display the physical topology
info when available:

$ ./lscpu
Architecture:          ppc64le
Byte Order:            Little Endian
CPU(s):                16
On-line CPU(s) list:   0-15
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             16
NUMA node(s):          1
Model:                 IBM pSeries (emulated by qemu)
Hypervisor vendor:     KVM
Virtualization type:   para
L1d cache:             64K
L1i cache:             32K
NUMA node0 CPU(s):     0-15
Physical sockets:      2 <<< New
Physical chips:        4 <<< New
Physical cores/chip:   4 <<< New

For now, physical topology information is available on platforms that
support the following RTAS (Real time abstraction service) call provided
by librtas:

rtas_get_sysparm(PROCESSOR_MODULE_INFO).

Currently this call is available to the PowerVM (pHYP) guests on PowerPC.
With a patch propoosed to PowerKVM, this RTAS call would also be available
to PowerKVM guests.

Based on input from Nishanth Aravamudan and Karel Zak.

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
9 years agoMerge branch 'races' of git://github.com/kerolasa/lelux-utiliteetit
Karel Zak [Wed, 2 Dec 2015 09:27:43 +0000 (10:27 +0100)] 
Merge branch 'races' of git://github.com/kerolasa/lelux-utiliteetit

9 years agolsns: improve man page
Karel Zak [Tue, 1 Dec 2015 16:27:22 +0000 (17:27 +0100)] 
lsns: improve man page

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agoinclude: add missing header file
Karel Zak [Tue, 1 Dec 2015 14:44:26 +0000 (15:44 +0100)] 
include: add missing header file

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolsns: fix usage()
Karel Zak [Tue, 1 Dec 2015 12:50:51 +0000 (13:50 +0100)] 
lsns: fix usage()

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolsns: add details to the man page
Karel Zak [Tue, 1 Dec 2015 12:00:14 +0000 (13:00 +0100)] 
lsns: add details to the man page

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolsns: sort namespaces, avoid duplicate entries in tree output
Karel Zak [Tue, 1 Dec 2015 11:31:30 +0000 (12:31 +0100)] 
lsns: sort namespaces, avoid duplicate entries in tree output

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolsns: remove unwanted comment
Karel Zak [Tue, 1 Dec 2015 10:45:11 +0000 (11:45 +0100)] 
lsns: remove unwanted comment

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolsns: add man page
Karel Zak [Tue, 1 Dec 2015 10:40:51 +0000 (11:40 +0100)] 
lsns: add man page

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolsns: filter by NS type
Karel Zak [Mon, 30 Nov 2015 14:55:31 +0000 (15:55 +0100)] 
lsns: filter by NS type

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolsln: allows to list namespace processes
Karel Zak [Mon, 30 Nov 2015 13:06:05 +0000 (14:06 +0100)] 
lsln: allows to list namespace processes

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolibsmartcols: make sure we have space for ascii art
Karel Zak [Mon, 30 Nov 2015 11:53:42 +0000 (12:53 +0100)] 
libsmartcols: make sure we have space for ascii art

* more verbose output about columns width counting
* strlen_line() does not care about space between columns and extra
  tree ASCII art. Let's assume that all termwith is possible to use
  for this extra stuff, it means that maximal buffer size is
  biggest_line + termwidth.

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolibsmartcols: allow to reduce tree columns
Karel Zak [Mon, 30 Nov 2015 10:43:05 +0000 (11:43 +0100)] 
libsmartcols: allow to reduce tree columns

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolsns: read all processes when --task specified
Karel Zak [Fri, 27 Nov 2015 13:24:09 +0000 (14:24 +0100)] 
lsns: read all processes when --task specified

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agobuild-sys: add lsns to gitignore
Karel Zak [Fri, 27 Nov 2015 12:57:22 +0000 (13:57 +0100)] 
build-sys: add lsns to gitignore

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolsns: add USER and UID
Karel Zak [Fri, 27 Nov 2015 12:56:31 +0000 (13:56 +0100)] 
lsns: add USER and UID

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agonamei: move icache to lib/
Karel Zak [Fri, 27 Nov 2015 12:56:01 +0000 (13:56 +0100)] 
namei: move icache to lib/

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolsns: new command
Karel Zak [Thu, 26 Nov 2015 13:09:45 +0000 (14:09 +0100)] 
lsns: new command

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agolslocks: use stuff from lib/procutils
Karel Zak [Wed, 25 Nov 2015 13:17:22 +0000 (14:17 +0100)] 
lslocks: use stuff from lib/procutils

Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agoagetty: don't ignore netlink on select()
Karel Zak [Tue, 24 Nov 2015 16:44:38 +0000 (17:44 +0100)] 
agetty: don't ignore netlink on select()

agetty uses NETLINK_ROUTE to be notified about network interface
changes. Unfortunately, the code that monitor the netlink FD does not
increment number of the monitored file descriptors when call
select(2), so the netlink notifications are invisible for agetty.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1278906
Signed-off-by: Karel Zak <kzak@redhat.com>