]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
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 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

8 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>
8 years agoFix subtle typo
fREW Schmidt [Mon, 7 Dec 2015 22:16:30 +0000 (14:16 -0800)] 
Fix subtle typo

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

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

8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 years agomesg: fix multiple races
Sami Kerola [Sat, 31 Oct 2015 18:16:07 +0000 (18:16 +0000)] 
mesg: fix multiple races

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
8 years agofdformat: fix block device open race
Sami Kerola [Sat, 31 Oct 2015 18:34:36 +0000 (18:34 +0000)] 
fdformat: fix block device open race

This fix makes fdformat also to detect if block device is busy, and warn if
the device is misaligned.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
8 years agomkswap: fix block device open race
Sami Kerola [Sat, 31 Oct 2015 18:10:00 +0000 (18:10 +0000)] 
mkswap: fix block device open race

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
8 years agomkfs.minix: fix block device open race
Sami Kerola [Sat, 31 Oct 2015 18:08:27 +0000 (18:08 +0000)] 
mkfs.minix: fix block device open race

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
8 years agomkfs.bfs: allow creating file system to a file
Sami Kerola [Sun, 22 Nov 2015 19:58:26 +0000 (19:58 +0000)] 
mkfs.bfs: allow creating file system to a file

Most, if not all, linux file systems allow this and there should not be a
reason why bfs could not do the same.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
8 years agomkfs.bfs: fix block device open race
Sami Kerola [Sat, 31 Oct 2015 18:06:46 +0000 (18:06 +0000)] 
mkfs.bfs: fix block device open race

This fix makes mkfs.bfs also to detect if block device is busy, and warn if
the device is misaligned.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
8 years agolib/blkdev: add open_blkdev_or_file() function
Sami Kerola [Sat, 31 Oct 2015 17:29:02 +0000 (17:29 +0000)] 
lib/blkdev: add open_blkdev_or_file() function

Purpose of this function is to open a path that is potentially pointing to a
block device or file without races.  The function also proper open(3) flags
are used to check the device is not busy, and finally warning is been
printed if a block device happens to be misaligned.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
8 years agoinclude/fileutils: add is_same_inode() check
Sami Kerola [Sat, 31 Oct 2015 17:26:51 +0000 (17:26 +0000)] 
include/fileutils: add is_same_inode() check

Check if a file descriptor and path or stat structure are represent the same
file.  This function is needed for TACTOU avoidance.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
8 years agotests: update ZFS test
Karel Zak [Thu, 19 Nov 2015 18:08:00 +0000 (19:08 +0100)] 
tests: update ZFS test

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agoinclude: remove now useless linux_reboot.h.
Casper Ti. Vector [Thu, 19 Nov 2015 02:56:34 +0000 (10:56 +0800)] 
include: remove now useless linux_reboot.h.

8 years agoctrlaltdel: use reboot() provided by libc, assuming it is 1-adic.
Casper Ti. Vector [Thu, 19 Nov 2015 02:52:14 +0000 (10:52 +0800)] 
ctrlaltdel: use reboot() provided by libc, assuming it is 1-adic.

8 years agolosetup: clean up --direct-io
Karel Zak [Thu, 19 Nov 2015 10:57:05 +0000 (11:57 +0100)] 
losetup: clean up --direct-io

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agolosetup: support list direct io
Ming Lei [Tue, 17 Nov 2015 14:32:48 +0000 (22:32 +0800)] 
losetup: support list direct io

So that user can see if DIO is set for current loop device.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
8 years agolosetup: support ioctl cmd of LOOP_SET_DIRECT_IO
Ming Lei [Tue, 17 Nov 2015 14:32:47 +0000 (22:32 +0800)] 
losetup: support ioctl cmd of LOOP_SET_DIRECT_IO

From v4.4, linux kernel starts to support direct I/O and
AIO to backing file for loop driver, so allow losetup to
enable the feature by using LOOP_SET_DIRECT_IO ioctl cmd.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
8 years agoblkid: don't mark zfs as RAID
Karel Zak [Wed, 18 Nov 2015 10:55:35 +0000 (11:55 +0100)] 
blkid: don't mark zfs as RAID

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agobash-completion: fstrim: use mountpoint, not device
Andreas Henriksson [Thu, 12 Nov 2015 11:36:03 +0000 (12:36 +0100)] 
bash-completion: fstrim: use mountpoint, not device

fstrim takes mountpoint as argument but the bash completion
was completing it to a device node.

Addresses: http://bugs.debian.org/804833
Reported-by: Ritesh Raj Sarraf <rrs@debian.org>
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
8 years agolsipc: tweak a few wordings on the manpage
Benno Schulenberg [Sun, 8 Nov 2015 10:54:15 +0000 (11:54 +0100)] 
lsipc: tweak a few wordings on the manpage

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
8 years agochfn: improve formatting and wording of the manpage
Benno Schulenberg [Sun, 8 Nov 2015 10:54:14 +0000 (11:54 +0100)] 
chfn: improve formatting and wording of the manpage

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
8 years agohexdump: fix a typo and tweak some wordings in the manpage
Benno Schulenberg [Sun, 8 Nov 2015 10:54:13 +0000 (11:54 +0100)] 
hexdump: fix a typo and tweak some wordings in the manpage

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
8 years agodmseg: slightly improve punctuation and formatting of the manpage
Benno Schulenberg [Sun, 8 Nov 2015 10:54:12 +0000 (11:54 +0100)] 
dmseg: slightly improve punctuation and formatting of the manpage

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>