]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
8 years agodoap: fix download URL
Karel Zak [Mon, 25 Jan 2016 14:42:53 +0000 (15:42 +0100)] 
doap: fix download URL

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agolibsmartcols: make SCOLS_FL_WRAP usable in tree
Karel Zak [Mon, 25 Jan 2016 14:31:24 +0000 (15:31 +0100)] 
libsmartcols: make SCOLS_FL_WRAP usable in tree

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agolibsmartcols: reduce also SCOLS_FL_WRAP columns
Karel Zak [Mon, 25 Jan 2016 14:17:36 +0000 (15:17 +0100)] 
libsmartcols: reduce also SCOLS_FL_WRAP columns

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agolibsmartcols: add wrap.c sample
Karel Zak [Mon, 25 Jan 2016 14:17:21 +0000 (15:17 +0100)] 
libsmartcols: add wrap.c sample

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agolibsmartcols: fix title sample
Karel Zak [Mon, 25 Jan 2016 12:45:34 +0000 (13:45 +0100)] 
libsmartcols: fix title sample

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agolibsmartcols: fix samples build, add title.c
Karel Zak [Mon, 25 Jan 2016 12:42:51 +0000 (13:42 +0100)] 
libsmartcols: fix samples build, add title.c

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agolibsmartcols: add samples directory
Karel Zak [Mon, 25 Jan 2016 12:17:43 +0000 (13:17 +0100)] 
libsmartcols: add samples directory

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agoMerge branch 'scols_fl_wrap' of https://github.com/ignatenkobrain/util-linux
Karel Zak [Mon, 25 Jan 2016 12:03:29 +0000 (13:03 +0100)] 
Merge branch 'scols_fl_wrap' of https://github.com/ignatenkobrain/util-linux

* 'scols_fl_wrap' of https://github.com/ignatenkobrain/util-linux:
  libsmartcols: add scols_column_is_wrap to docs
  libsmartcols: don't loose colors when wrapping
  libsmartcols: wrap columns correctly with unicode
  libsmartcols: implement SCOLS_FL_WRAP

8 years agolibsmartcols: document v2.27 symbols
Karel Zak [Mon, 25 Jan 2016 11:57:10 +0000 (12:57 +0100)] 
libsmartcols: document v2.27 symbols

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agoadd util-linux.doap
Igor Gnatenko [Sun, 24 Jan 2016 23:47:07 +0000 (00:47 +0100)] 
add util-linux.doap

This is also well-known RDF Schema supported by some editors.

Reference: https://github.com/edumbill/doap/wiki
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years agoadd .editorconfig
Igor Gnatenko [Sun, 24 Jan 2016 22:57:51 +0000 (23:57 +0100)] 
add .editorconfig

EditorConfig is very well known config file for text editors/IDE's
with settings for project. This format supported by Vim, GNOME Builder,
Atom, Sublime and many others.

We will provide this configuration to be more friendly for newcomers.

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years agolibsmartcols: add 'Since' tag for gtkdoc for some functions
Igor Gnatenko [Sun, 24 Jan 2016 22:52:41 +0000 (23:52 +0100)] 
libsmartcols: add 'Since' tag for gtkdoc for some functions

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years agolibsmartcols: add few methods to get information about title
Igor Gnatenko [Sun, 24 Jan 2016 22:47:42 +0000 (23:47 +0100)] 
libsmartcols: add few methods to get information about title

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years agolibsmartcols: position of title in fact unsigned
Igor Gnatenko [Sun, 24 Jan 2016 22:34:53 +0000 (23:34 +0100)] 
libsmartcols: position of title in fact unsigned

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years agolsblk: remove useless warnings
Karel Zak [Fri, 22 Jan 2016 18:38:18 +0000 (19:38 +0100)] 
lsblk: remove useless warnings

It's seems better to keep the warnings only in the debug output.

Reported-by: Kay Sievers <kay@vrfy.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agolibsmartcols: support multibyte titles, rename wrap to padding
Karel Zak [Fri, 22 Jan 2016 15:51:59 +0000 (16:51 +0100)] 
libsmartcols: support multibyte titles, rename wrap to padding

- let's support multibyte table titles
- use lib/mbalign.c to align the title
- rename title_wrap to title_padding (we already use "wrap" on another
  places for another things)

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agolibsmartcols: add scols_column_is_wrap to docs
Igor Gnatenko [Fri, 22 Jan 2016 13:48:46 +0000 (14:48 +0100)] 
libsmartcols: add scols_column_is_wrap to docs

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years agolibsmartcols: don't loose colors when wrapping
Igor Gnatenko [Fri, 22 Jan 2016 13:30:39 +0000 (14:30 +0100)] 
libsmartcols: don't loose colors when wrapping

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years agolibsmartcols: wrap columns correctly with unicode
Igor Gnatenko [Fri, 22 Jan 2016 13:29:16 +0000 (14:29 +0100)] 
libsmartcols: wrap columns correctly with unicode

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years agolibsmartcols: add title to the test application
Karel Zak [Fri, 22 Jan 2016 12:50:02 +0000 (13:50 +0100)] 
libsmartcols: add title to the test application

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agolibsmartcols: add JSON to the test application
Karel Zak [Fri, 22 Jan 2016 12:46:29 +0000 (13:46 +0100)] 
libsmartcols: add JSON to the test application

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agolibsmartcols: add new functions to docs
Karel Zak [Fri, 22 Jan 2016 12:40:19 +0000 (13:40 +0100)] 
libsmartcols: add new functions to docs

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agoMerge branch 'table_title' of https://github.com/ignatenkobrain/util-linux
Karel Zak [Fri, 22 Jan 2016 12:34:05 +0000 (13:34 +0100)] 
Merge branch 'table_title' of https://github.com/ignatenkobrain/util-linux

* 'table_title' of https://github.com/ignatenkobrain/util-linux:
  libsmartcols: set everything once in scols_table_set_title()
  libsmartcols: put new line after title
  libsmartcols: fix title aligning to center
  libsmartcols: don't try to align title if it's more that term
  libsmartcols: use symbols for title wrap
  libsmartcols: implement title of table

8 years agolibsmartcols: set everything once in scols_table_set_title()
Igor Gnatenko [Fri, 22 Jan 2016 11:54:02 +0000 (12:54 +0100)] 
libsmartcols: set everything once in scols_table_set_title()

Reported-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years agolibsmartcols: implement SCOLS_FL_WRAP
Igor Gnatenko [Thu, 21 Jan 2016 08:57:31 +0000 (09:57 +0100)] 
libsmartcols: implement SCOLS_FL_WRAP

Reference: https://github.com/karelzak/util-linux/issues/257
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years agolibsmartcols: put new line after title
Igor Gnatenko [Thu, 21 Jan 2016 16:37:21 +0000 (17:37 +0100)] 
libsmartcols: put new line after title

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years agolibsmartcols: fix title aligning to center
Igor Gnatenko [Thu, 21 Jan 2016 16:36:53 +0000 (17:36 +0100)] 
libsmartcols: fix title aligning to center

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years agolibsmartcols: don't try to align title if it's more that term
Igor Gnatenko [Thu, 21 Jan 2016 16:25:15 +0000 (17:25 +0100)] 
libsmartcols: don't try to align title if it's more that term

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years agolibsmartcols: use symbols for title wrap
Igor Gnatenko [Thu, 21 Jan 2016 16:09:16 +0000 (17:09 +0100)] 
libsmartcols: use symbols for title wrap

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years agolibsmartcols: implement title of table
Igor Gnatenko [Thu, 21 Jan 2016 09:02:31 +0000 (10:02 +0100)] 
libsmartcols: implement title of table

Reference: https://github.com/karelzak/util-linux/issues/258
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years agozramctl: fix typo
Karel Zak [Thu, 21 Jan 2016 10:21:27 +0000 (11:21 +0100)] 
zramctl: fix typo

Reported-by: Rafael Fontenelle <rffontenelle@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agomount: allow nofail to silence ENOMEDIUM cases
Mike Frysinger [Wed, 20 Jan 2016 20:20:08 +0000 (15:20 -0500)] 
mount: allow nofail to silence ENOMEDIUM cases

Allow people to use nofail to ignore empty cd/dvd drive errors.

URL: https://bugs.gentoo.org/559356
Reported-by: William Hubbs <williamh@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
8 years agochrt: use sched_getattr()
Karel Zak [Wed, 20 Jan 2016 14:32:30 +0000 (15:32 +0100)] 
chrt: use sched_getattr()

8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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.

8 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'.

8 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.

8 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.

8 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.

8 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

8 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>
8 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>
8 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>
8 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

8 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

8 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.

8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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

8 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>
8 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"

8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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

8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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