libblkid: (nilfs2) check also backup superblock

* read also backup superblock
* check which superblock is newer
* set minimal device size to 1MiB

Reported-by: Phillip Susi <psusi@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
fallocate: prefer FALLOC_FL_* flags from libc headers

Reported-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
mount: update man page ext3/4 mount options

Add missing mount options to ext3 and ext4 filesystems. This also
remove resize option information from the man page.

Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
partx: fix --update ranges and out of order tables

partx --update DEVICE NUMBER
was broken in 2 cases:
 * if NUMBER != 1
 * if the partition table was "out of order".
   Ie, where sda2 came after sda3.

References: https://bugs.launchpad.net/ubuntu/+source/cloud-utils/+bug/1244662
Signed-off-by: Scott Moser <smoser@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
tests: update partx sgi test

Since commit 4253275490926cf533bfd0bc33279729e9ff427a the libblkid
lists system partitions for SGI label.

Signed-off-by: Karel Zak <kzak@redhat.com>
tests: add partx --update test

Signed-off-by: Karel Zak <kzak@redhat.com>
docs: add lslogins(1) to TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
lscpu: sort NUMA nodes to keep output human readable

Signed-off-by: Karel Zak <kzak@redhat.com>
tests: update lscpu tests

Signed-off-by: Karel Zak <kzak@redhat.com>
pylibmount: remove unncessary subdirectory

Signed-off-by: Karel Zak <kzak@redhat.com>
pylibmount: import directly from pylibmount in tests

This change does not have any impact to in a standard way installed
libmount impact. It's simplification for in-tree tests.

Signed-off-by: Karel Zak <kzak@redhat.com>
more: fix mem leak [coverity scan]

... the code is so soo ugly.

Signed-off-by: Karel Zak <kzak@redhat.com>
column: fix mem leak [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
rename: fix mem leak [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
libmount: fix scanf format string [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
lib/sysfs: fix scanf format string [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid: add blkid_partlist_get_partition_by_partno()

Signed-off-by: Karel Zak <kzak@redhat.com>
partx: use blkid_partlist_get_partition_by_partno()

Signed-off-by: Karel Zak <kzak@redhat.com>
script: don't wait for empty descriptors if child is dead

The current code waits for empty file master and slave descriptors,
but it makes sense only if there is child process that cares (read)
about data in the descriptors.

Signed-off-by: Karel Zak <kzak@redhat.com>
script: fix inconsistent -q, use poll() rather then O_NONBLOCK

 - don't suppress "Script done" message in typescript file by -q
   (note that -q has no effect to "Script started" message)

 - simplify the code by poll()

Signed-off-by: Karel Zak <kzak@redhat.com>