docs: refresh TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
umount: don't use mountinfo if possible

The umount(8) always parses /proc/self/mountinfo to get fstype and to
merge kernel mount options with userspace mount options from
/run/mount/utab. This behavior is overkill in many cases and it's
pretty expensive as kernel has to always compose *whole* mountinfo.
This performance disadvantage is visible for crazy use-cases with huge
number of mountpoints and frequently called umount(8).

It seems that we can bypass /proc/self/mountinfo by statfs() to get
filesystem type (statfs.f_type magic) and analyze /run/mount/utab
before we parse mountinfo.

This optimization is not used when:

 * umount(8) executed by non-root (as user= in utab is expected)
 * umount --lazy / --force (target is probably unreachable NFS, then
   use statfs() is pretty bad idea)
 * target is not a directory (e.g. umount /dev/sda1)
 * there is (deprecated) writeable mtab

Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount: cgroup magic already defined

Signed-off-by: Karel Zak <kzak@redhat.com>
partx: make dirent d_type usage more robust

Signed-off-by: Karel Zak <kzak@redhat.com>
lib/sysfs: make dirent d_type usage more robust

Signed-off-by: Karel Zak <kzak@redhat.com>
switch_root: make dirent d_type usage more robust

Signed-off-by: Karel Zak <kzak@redhat.com>
lscpu: don't assume filesystem supports d_type when searching for NUMA nodes

Not all file systems support the d_type field and simply checking for
d_type == DT_DIR in is_node_dirent would cause the test suite to fail
if run on (for example) XFS.

The simple fix is to check for DT_DIR or DT_UNKNOWN in is_node_dirent.

Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
lscpu: read_hypervisor_dmi: only fallback to memory scan on x86/x86_64

As the comment in the code says, this method is really only valid
on x86 and x86_64, so add a #ifdef for those architectures around
that code block.

This was causing "Program lscpu tried to access /dev/mem between f0000->100000."
warnings on some ppc64 machines.

Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
hexdump: color unit may now be longer than the corresponding format unit

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
logger: allow user to send structured journald messages

This feature is hopefully mostly used to give MESSAGE_ID labels for
messages coming from scripts, making search of messages easy.  The
logger(1) manual page update should give enough information how to use
--journald option.

[kzak@redhat.com: - add missing #ifdefs
                  - use xalloc.h]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
docs: fix two command representations in the man page of more

The previous-file command is not :P but :p, and the back-to-where
command is not an acute accent but an apostrophe.  Also condense
some of the descriptions and remove some useless comments.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Merge branch 'master' of https://github.com/rudimeier/util-linux

* 'master' of https://github.com/rudimeier/util-linux:
  travis-ci: import travis yaml controller
build-sys: don't connect _DEPENDENCIES and _LIBADD

The _DEPENDENCIES has to be used for dependencies on another in-tree
files, but _LIBADD is to specify additional libs (including external
libs).

Reported-by: oleid <notifications@github.com>
Signed-off-by: Karel Zak <kzak@redhat.com>