libsmartcols: fix padding

Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid: fix return codes from PART_ENTRY_* probing

The partitions prober does two step:

1) probe the assigned device for partition table

2) probe whole-disk device for partition table if the assigned device is a
   partition (this generates PART_ENTRY_* results for blkid -p -o udev))

The step 2) is optional and the return code from this probing should
not override success (rc=0) from the step 1) -- except situations when
the step 2) ends with I/O error or when the step 1) found nothing, but
2) was successful.

Signed-off-by: Karel Zak <kzak@redhat.com>
lib/mbsalign: split mbs_safe_encode()

Signed-off-by: Karel Zak <kzak@redhat.com>
libsmartcols: resuse buffer for encoded data

Signed-off-by: Karel Zak <kzak@redhat.com>
libsmartcols: don't mix width (in cells) and size (in bytes)

Signed-off-by: Karel Zak <kzak@redhat.com>
lib/mbalign: report also size in bytes

Signed-off-by: Karel Zak <kzak@redhat.com>
libsmartcols: don't colorize tree ascii art

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: add generic function to check partitions order

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: fix logical partition reorder command

Reported-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid: make new_partition() more robust

Signed-off-by: Karel Zak <kzak@redhat.com>
libsmartcols: fix buffer usage

Signed-off-by: Karel Zak <kzak@redhat.com>
fallocate: introduce an option -c to support COLLAPSE_RANGE

Introduce a new option -c (or --collapse-range) to support a new flag
FALLOC_FL_COLLAPSE_RANGE for fallocate(2). It will nullify a particular
range [offset, offset+len] by shifting extents beyond the range to the
beginning of the hole.

Cc: Lukas Czerner <lczerner@redhat.com>
Cc: Namjae Jeon <namjae.jeon@samsung.com>
Cc: Ashish Sangwan <a.sangwan@samsung.com>
Signed-off-by: Dongsu Park <dongsu.park@profitbricks.com>
fallocate: add FALLOC_FL_ZERO_RANGE support

Recent Linux kernel supports FALLOC_FL_ZERO_RANGE in fallocate(2).
This patch adds FALLOC_FL_ZERO_RANGE support to fallocate utility,
by introducing a new option -z|--zero-range.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
unshare: add + to getopt_long()

Signed-off-by: Karel Zak <kzak@redhat.com>
nsenter: add + to getopt_long()

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: add partitions reorder operation to label API

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: (gpt) implement 'fix order' commnad

Signed-off-by: Karel Zak <kzak@redhat.com>
tests: fdisk added a partitions order message (8b60872e)

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
partx: Improve the typesetting of the manual

  Add a space character around '|' (means "or")

  Add "(hyphen-minus)" after "\-" to show character name for input

  Change '\-\-' to '\en', when it is used as a dash (pause, separation)

  Add a comma before "or" in a series of words (3 or more)

  Change '-' to '\(en' (an en-dash), if it means a range

  Protect a full stop (.), that begins or ends a string, with \&

  Change '--' to '\-\-', if it indicates an option

  Change '-' to '\-', if it indicates an option

  Change '-' to '\-', if means a minus

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
raw: Improve the typesetting of the manual

  Remove space at end of lines

  Change '-' to '\-', if it indicates an option

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>