Changes between v2.30 and v2.30.1
--------------------------------------------

commit 1dc4d2efe875eef1231043ef0d54549e35a7864b
Author: Karel Zak <kzak@redhat.com>
Date:   Thu Jul 20 11:21:59 2017 +0200

    build-sys: release++ (v2.30.1)
    
    Signed-off-by: Karel Zak <kzak@redhat.com>

 NEWS         | 4 ++++
 configure.ac | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

commit 6029de47401740507d6621a97216db66b103f72d
Author: Karel Zak <kzak@redhat.com>
Date:   Thu Jul 20 11:20:44 2017 +0200

    docs: update v2.30.1-ReleaseNotes
    
    Signed-off-by: Karel Zak <kzak@redhat.com>

 Documentation/releases/v2.30.1-ReleaseNotes | 49 +++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

commit 2eaa1beb8da48bc616e3c3adda879d8acccb5294
Author: Karel Zak <kzak@redhat.com>
Date:   Thu Jul 20 11:19:04 2017 +0200

    docs: update AUTHORS file
    
    Signed-off-by: Karel Zak <kzak@redhat.com>

 AUTHORS | 5 +++++
 1 file changed, 5 insertions(+)

commit 40c7fe6c86d453d878d0bf4b33f5d8827f11ca5d
Author: Karel Zak <kzak@redhat.com>
Date:   Thu Jul 20 11:17:47 2017 +0200

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

 po/ca.po          |  517 ++++++++++++-----------
 po/cs.po          |  517 ++++++++++++-----------
 po/da.po          | 1202 +++++++++++++++++++++++++++--------------------------
 po/de.po          |  517 ++++++++++++-----------
 po/es.po          |  517 ++++++++++++-----------
 po/et.po          |  517 ++++++++++++-----------
 po/eu.po          |  517 ++++++++++++-----------
 po/fi.po          |  517 ++++++++++++-----------
 po/fr.po          |  517 ++++++++++++-----------
 po/gl.po          |  517 ++++++++++++-----------
 po/hr.po          |  517 ++++++++++++-----------
 po/hu.po          |  517 ++++++++++++-----------
 po/id.po          |  517 ++++++++++++-----------
 po/it.po          |  517 ++++++++++++-----------
 po/ja.po          |  517 ++++++++++++-----------
 po/nl.po          |  517 ++++++++++++-----------
 po/pl.po          |  517 ++++++++++++-----------
 po/pt_BR.po       | 1202 +++++++++++++++++++++++++++--------------------------
 po/ru.po          |  517 ++++++++++++-----------
 po/sl.po          |  517 ++++++++++++-----------
 po/sv.po          |  517 ++++++++++++-----------
 po/tr.po          |  517 ++++++++++++-----------
 po/uk.po          |  517 ++++++++++++-----------
 po/util-linux.pot |  518 +++++++++++------------
 po/vi.po          |  517 ++++++++++++-----------
 po/zh_CN.po       |  517 ++++++++++++-----------
 po/zh_TW.po       |  517 ++++++++++++-----------
 27 files changed, 7789 insertions(+), 7541 deletions(-)

commit 9a70a4e5bc43b08a7a42697c81807fcfc5a25722
Author: Rafael Fontenelle <rffontenelle@gmail.com>
Date:   Thu Jul 20 11:08:09 2017 +0200

    po: update pt_BR.po (from translationproject.org)

 po/pt_BR.po | 1726 ++++++++++++++++++++++++++++-------------------------------
 1 file changed, 820 insertions(+), 906 deletions(-)

commit bd7786a91b0e265386b7a7f173bbb888b1976b77
Author: Joe Hansen <joedalton2@yahoo.dk>
Date:   Thu Jul 20 11:08:09 2017 +0200

    po: update da.po (from translationproject.org)

 po/da.po | 3700 +++++++++++++++++++++++---------------------------------------
 1 file changed, 1367 insertions(+), 2333 deletions(-)

commit 12ceddc3e42c82d181066381dac49b07c1301b5a
Author: Karel Zak <kzak@redhat.com>
Date:   Thu Jul 20 11:02:35 2017 +0200

    tests: update build-sys non-widechar test
    
    Signed-off-by: Karel Zak <kzak@redhat.com>

 tests/expected/build-sys/config-non-widechar | 110 +++++++++++++++++++++++++++
 1 file changed, 110 insertions(+)

commit df46ae56fab8de8dcb4c028783a9d417d403b7b5
Author: Carlos Santos <casantos@datacom.ind.br>
Date:   Thu Jun 29 07:55:42 2017 -0300

    column: fix compilation when libc lacks wide-character support
    
    Commit 4762ae9d removed mtsafe_strtok() but left behind calls to wcstok
    and wcspbrk. This leads to build failures when libc does not have the
    wide-character functions, like some uClibc builds.
    
    Solve the problem by using strtok_r and strpbrk when HAVE_WIDECHAR is
    not defined.
    
    Fixes:
      http://autobuild.buildroot.net/results/fd8a1a8e0cef3aeed9588540e8e663664f6b43aa
      http://autobuild.buildroot.net/results/5ad73ea8b471321988c50d80a5e50d4504151dd6
      http://autobuild.buildroot.net/results/04411b7280dc51ecd51236967981a42352bbeb3e
    
    Signed-off-by: Carlos Santos <casantos@datacom.ind.br>

 text-utils/column.c | 8 ++++++++
 1 file changed, 8 insertions(+)

commit 47201d6076ce46c40cb561c915de1ab13f98e628
Author: Karel Zak <kzak@redhat.com>
Date:   Thu Jul 20 10:43:19 2017 +0200

    cfdisk: simplify ncurses includes
    
    Signed-off-by: Karel Zak <kzak@redhat.com>

 disk-utils/cfdisk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 4e3afcac37bf500039130f6864cb5a02ba7a09c1
Author: Ivan Delalande <colona@arista.com>
Date:   Thu Jul 6 18:27:11 2017 -0700

    libmount: make mnt_context_is_fs_mounted work for /proc
    
    Assume that /proc is not mounted instead of returning an error when we
    are unable to open the mounts and mountinfo files in /proc. Also set
    cxt->mtab back to NULL so that it gets properly parsed when we check if
    the next filesystem is mounted.
    
    The goal is to have mount -a work when /proc is not mounted, typically
    with /proc on the first line of fstab.
    
    Signed-off-by: Ivan Delalande <colona@arista.com>

 libmount/src/context.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

commit 23fec903f436aac52f78101d77a5000b399aaa73
Author: Karel Zak <kzak@redhat.com>
Date:   Wed Jul 12 14:35:53 2017 +0200

    libblkid: don't use CDROM_GET_CAPABILITY ioctl for DM devices
    
    For some reason kernel commit e980f62353c697cbf0c4325e43df6e44399aeb64
    add extra warning when the ioctl is used for DM devices. It seems we
    can avoid this ioctl when the device has dm/uuid.
    
    Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1469532
    Signed-off-by: Karel Zak <kzak@redhat.com>

 disk-utils/fdisk-list.c |  2 +-
 include/sysfs.h         |  2 +-
 lib/sysfs.c             | 18 +++++++++++-------
 libblkid/src/probe.c    |  6 +++++-
 libblkid/src/verify.c   |  2 +-
 5 files changed, 19 insertions(+), 11 deletions(-)

commit 8a264bb05fab041abef84dc0f57833b81b09eefb
Author: Karel Zak <kzak@redhat.com>
Date:   Mon Jul 17 11:36:28 2017 +0200

    test: update PMBR hex dumps
    
    The commit 8ffa3b651d7e74acba8f1d831b7f68fdb3c66aae has fixed PMBR
    CHS addresses initialization to be more close to UEFI standard.
    
    -000001c0  01 00 ee fe ff ff 01 00  00 00 ff 8f 01 00 00 00
    +000001c0  02 00 ee ff ff ff 01 00  00 00 ff 8f 01 00 00 00
    
    Signed-off-by: Karel Zak <kzak@redhat.com>

 tests/expected/sfdisk/gpt-attrs           | 2 +-
 tests/expected/sfdisk/gpt-attrs-guid      | 2 +-
 tests/expected/sfdisk/gpt-attrs-space     | 2 +-
 tests/expected/sfdisk/gpt-attrs-with-typo | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

commit 9394a8bd0f1286c83c81f5a4b25da3ad67132d68
Author: Karel Zak <kzak@redhat.com>
Date:   Fri Jul 14 12:48:18 2017 +0200

    libfdisk: make fdisk compliant to UEFI/GPT specification on PMBR
    
    The PMBR partition record should be StartingCHS=0x002000 (0/0/2)
    and EndingCHS=0xFFFFFF (1023/255/63)
    
    Addresses: https://github.com/karelzak/util-linux/issues/485
    Signed-off-by: Karel Zak <kzak@redhat.com>

 libfdisk/src/gpt.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

commit 16c77fad03105f29b7d572a1af959f8ceb41f791
Author: Karel Zak <kzak@redhat.com>
Date:   Tue Jul 11 14:24:32 2017 +0200

    libfdisk: (dos) accept start for log.partitions on template
    
    Signed-off-by: Karel Zak <kzak@redhat.com>

 libfdisk/src/dos.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

commit df994aca9ef463c811c4f8ce986d88c430023cf7
Author: Karel Zak <kzak@redhat.com>
Date:   Tue Jul 11 12:25:02 2017 +0200

    libfdisk: (dos) cleanup template based partitioning
    
    Signed-off-by: Karel Zak <kzak@redhat.com>

 libfdisk/src/dos.c       | 58 +++++++++++++++++++++++++++---------------------
 libfdisk/src/partition.c | 12 ++++++++++
 2 files changed, 45 insertions(+), 25 deletions(-)

commit 7dcd597f476a97f8718a68df9d6d02a81e6dd524
Author: Ivan Delalande <colona@arista.com>
Date:   Wed Jun 21 16:43:05 2017 -0700

    dmesg: print only 2 hex digits for each hex-escaped byte
    
    As buf is passed as a signed char buffer in fwrite_hex, fprintf will
    print every byte from 0x80 as a signed-extended int causing each of
    these bytes to be printed as "\xffffff80" and such, which can be pretty
    confusing. Force fprintf to use the argument as a char to make it print
    only 2 digits, e.g. "\x80".
    
    Signed-off-by: Ivan Delalande <colona@arista.com>

 sys-utils/dmesg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit a51be7457349b5924c36debd785414ac7d65b7e5
Author: Karel Zak <kzak@redhat.com>
Date:   Wed Jun 21 10:53:28 2017 +0200

    wipefs: exit on failed erase
    
    The current behavior is to report error and continue, it seems strange:
    
            # blockdev --setro /dev/sdc
    
            # wipefs -a /dev/sdc
            wipefs: /dev/sdc: failed to erase xfs magic string at offset 0x00000000: Operation not permitted
            /dev/sdc: 4 bytes were erased at offset 0x00000000 (xfs): 58 46 53 42
                              ^^^^^^^^^^^
                               not true
    
    The patch calls err() to exit.
    
    Reported-by: Vratislav Podzimek <vpodzime@redhat.com>
    Signed-off-by: Karel Zak <kzak@redhat.com>

 misc-utils/wipefs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 84fdc19b3350e41ee63f9a583a9245977e9f572b
Author: Karel Zak <kzak@redhat.com>
Date:   Mon Jun 19 14:32:59 2017 +0200

    libfdisk: (dos) be more verbose on partno -ERANGE error
    
    Signed-off-by: Karel Zak <kzak@redhat.com>

 libfdisk/src/dos.c       |  3 +++
 libfdisk/src/partition.c | 11 +++++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

commit a7947b7a0e899d6190a3ef0e1ad1836eb21abc6a
Author: Karel Zak <kzak@redhat.com>
Date:   Mon Jun 19 11:49:51 2017 +0200

    mount: fix man page typo (--bind,ro)
    
    Addresses: https://github.com/karelzak/util-linux/issues/464
    Signed-off-by: Karel Zak <kzak@redhat.com>

 sys-utils/mount.8 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit cf9a3db0a84c1baee08e92db50e88c22ebc21f5d
Author: Alex Ivanov <yourbestfriend@openmailbox.org>
Date:   Thu Jun 15 11:26:25 2017 +0300

    fstrim: prefer earlier mounted filesystems
    
    fstrim --all is broken in a way that if there is a bind mount for some filesystem,
    that filesystem will not be trimmed. This is especially critical for e.g.
    NixOS distribution, which needs bind mount within root fs:
    https://github.com/NixOS/nixos/blob/master/modules/system/boot/stage-2-init.sh#L55
    
    Currently for a given filesystem during "de-duplication by source and root" phase,
    an early mounted fs path is filtered (e.g. "/"), while later mounted fs path is kept
    (e.g. "/nix/store") though anyway discarded later (since it's an overlaying mount).
    This leads to skipped trimming.
    
    So flip this behaviour. Should also help for other types of overlaying mounts.
    
    Reference:
    https://github.com/karelzak/util-linux/blob/stable/v2.29/libmount/src/tab.c#L715
    
    Signed-off-by: Alex Ivanov <yourbestfriend@openmailbox.org>

 sys-utils/fstrim.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 122e060d282105165b1a16af0c032fdee1f58d9c
Author: Pali Rohár <pali.rohar@gmail.com>
Date:   Wed Jun 14 23:29:03 2017 +0200

    tests: Add UDF hdd images with blocksize 1024 and 4096 created by Linux mkudffs 1.3
    
    $ dd if=/dev/zero of=udf-hdd-mkudffs-1.3-4.img bs=1M count=10
    $ mkudffs -l Label -b 1024 udf-hdd-mkudffs-1.3-4.img
    
    $ dd if=/dev/zero of=udf-hdd-mkudffs-1.3-5.img bs=1M count=10
    $ mkudffs -l Label -b 4096 udf-hdd-mkudffs-1.3-5.img

 tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-4  |   9 +++++++++
 tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-5  |   9 +++++++++
 tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-4.img.xz | Bin 0 -> 2380 bytes
 tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-5.img.xz | Bin 0 -> 2396 bytes
 4 files changed, 18 insertions(+)

commit 83b8df64a24f8698a47fa09cadeff4750d5a0275
Author: Pali Rohár <pali.rohar@gmail.com>
Date:   Wed Jun 14 23:15:14 2017 +0200

    libblkid: udf: Fix detection of UDF images with block size 1024 and 4096
    
    When detecting block size of UDF filesystem, try to use also block size
    512, 1024, 2048 and 4096. This would allow blkid to detect UDF filesystem
    in image file created from 4K hard disk (which should have UDF block size
    4096).
    
    Before this patch only UDF images with block size of 512 and 2048 were
    detected as only block size from blkid_probe_get_sectorsize() and 2048 were
    used (blkid_probe_get_sectorsize() returns for disk images 512).

 libblkid/src/superblocks/udf.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

commit 24fb943e54b4edaea0fa13f721bc29ff67380172
Author: Ruediger Meier <ruediger.meier@ga-group.nl>
Date:   Sun Jun 11 20:45:14 2017 +0200

    tests: fix fincore, don't use variable COLUMNS
    
    COLUMNS is automatically set by bash and may result in stupid
    errors like
    
      fincore: unknown column: 160
    
    Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>

 tests/ts/fincore/count | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

commit 38be54d2829ca010d93fae0110e6a3f41f5d5298
Author: Karel Zak <kzak@redhat.com>
Date:   Tue Jun 13 12:15:11 2017 +0200

    lscpu: cleanup DMI detection return codes
    
    Michal wrote:
     There is weird mix of logic in lscpu-dmi.c which sometimes returns 0 and
     sometimes -1 on error. Since most checks are if (rc) goto done; this
     bails out early on error skipping some detection methods. Further, in
     lscpu.c all following detections are guarder by if(hyper) so returning
     -1 causes all following methods to be skipped.
    
    Reported-by: Michal Suchanek <msuchanek@suse.de>
    Signed-off-by: Karel Zak <kzak@redhat.com>

 sys-utils/lscpu-dmi.c | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

commit b49c756b0e781ae9bb59b532fab092780365294a
Author: Zac Medico <zmedico@gentoo.org>
Date:   Wed Jun 7 17:21:33 2017 -0700

    pylibmount: NULL terminate kwlist in Context_init
    
    Fixes a segfault observed with python3.6.

 libmount/python/context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 73123f6280adfc43f819812562aae3c2aa8c5359
Author: Karel Zak <kzak@redhat.com>
Date:   Tue Jun 6 12:05:14 2017 +0200

    umount: add note about NFS and -c to umount.8
    
    Signed-off-by: Karel Zak <kzak@redhat.com>

 sys-utils/umount.8 | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

commit 67cd71ca5565818ceb44825cc10709709368823e
Author: NeilBrown <neilb@suse.com>
Date:   Mon Jun 5 12:32:58 2017 +1000

    umount: never 'stat' the path when "-c" is given.
    
    It is currently not possible to reliably and automatically
    unmount an NFS filesystem. If the server is not available, the
    umount command will hang.
    
    The hang can be avoided by using "-l" or "-f", but neither
    of these are appropriate for automatic use such as by an
    automounter (e.g automountd or systemd).
    
    "-l" will unmount even if the filesystem is in use, which
    an automounter generally doesn't want.  If the filesystem
    is in use, then the umount should fail.
    
    "-f" can cause the filesystem to abort pending transactions
    which might break filesystem semantics.  This can be useful
    in the hands of a sysadmin, but not when used by an
    automatic tool.
    
    umount has another option, "-c" aka "--no-canonicalize"
    which avoids some "stat" calls.
    Currently this doesn't avoid all calls to
    canonicalize_path()
    as
      mnt_context_prepare_umount() ->
        lookup_umount_fs() ->
          mnt_context_find_umount_fs() ->
            mnt_context_get_mtab_for_target() ->
              mnt_resolve_path() ->
                canonicalize_path_and_cache() ->
                  canonicalize_path()
    
    leads to that function being called.
    
    The "-c" option could be taken to mean "I know what I'm
    doing, this really is the path to a mount point, I just want
    you to unmount it".  Given that, it seems suitable to
    extend this to avoid all 'stat' calls on the mountpoint.
    
    It is already appropriate for any automount program to pass
    "-c" to "umount", so they can be changed to do so at any
    time.
    With the patch below, "-c" will result in the mountpoint
    never being "stat"ed, so umount won't hang on an
    inaccessible server.
    
    This isn't quite sufficient, for NFS at least, as the usage
    of libmount in umount.nfs still calls 'stat' on the mount
    point.
    "-c" isn't passed to the umount helper, but it is reasonable
    for such helpers to assume "-c" because "umount" will have
    canonicalized the path when that is appropriate.
    
    So, this patch treats "-c" much like "-l" and "-f" when
    deciding whether it is safe to 'stat' the path.
    
    Signed-off-by: NeilBrown <neilb@suse.com>

 libmount/src/context_umount.c | 2 ++
 1 file changed, 2 insertions(+)

commit 87641d4cdceb20862dce5b6cd3a32a2f104a8827
Author: Jakub Wilk <jwilk@jwilk.net>
Date:   Fri Jun 2 23:54:10 2017 +0200

    fdformat: clear progress message before printing "done"
    
    Before:
    
        Formatting ... done1
    
    After:
    
        Formatting ... done
    
    Signed-off-by: Jakub Wilk <jwilk@jwilk.net>

 disk-utils/fdformat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit c32cd3f1a95b9d0ddac1287862319aa13879e3a8
Author: Karel Zak <kzak@redhat.com>
Date:   Fri Jun 23 14:26:47 2017 +0200

    agetty: fix login name DEL/CTRL^U issue
    
    agetty refresh prompt (/etc/issue file etc.) when requested by inotify
    or netlink. For this purpose we monitor some file descriptors by
    select().
    
    The terminal input file descriptor is switched to non-canonical mode before
    select(). The goal is to be informed about user activity before
    new-line. The FD is immediately switched back to canonical mode when
    activity is detected. The side effect is that all not-read-yet chars in
    the input buffer are lost ... so we need to call read() before switch
    to canonical mode to save the chars.
    
    The original implementation has been based on TIOCSTI ioctl. It
    returns already read chars back to the terminal input buffer to make
    them useful for canonical mode. The problem was race (agetty writes to
    input buffer in the same time as user) and result was reordered chars
    in login name... so useless.
    
    This issue has been later fixed by extra buffer (commit
    790119b8850ae13bb4254c5096a54b2aeb355b20) for already read data.  And
    TIOCSTI ioctl has been removed. Unfortunately this solution is also
    wrong, because the buffer is maintained only by agetty and
    inaccessible for terminal when user edit (by DEL/CTRL^U) login name in
    canonical mode.
    
    The solution is simple -- just don't try to be smart and keep terminal
    in canonical mode all time (so terminal controls DEL, CTRL^U, etc) and
    flush input buffer (=discard unread data) and ask user for login name
    again after prompt reload.
    
    The agetty reload is very rarely situation and for user it's pretty
    obvious that he has to type login name again (as all terminal has been
    clear+redraw).
    
    Addresses: https://github.com/karelzak/util-linux/issues/454
    Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1464148
    Signed-off-by: Karel Zak <kzak@redhat.com>

 term-utils/agetty.c | 70 ++++++++++++-----------------------------------------
 1 file changed, 15 insertions(+), 55 deletions(-)

commit d200c0a678d7f8f030d524da1a489944373bfe49
Author: Karel Zak <kzak@redhat.com>
Date:   Mon Jun 19 11:41:02 2017 +0200

    libfdisk: (dos) fix primary/logical logic when follow template
    
    This stupid bug has been introduced by e1cfb304 (v2.30) and it
    disables to create extended partition by cfdisk :-(
    
    Signed-off-by: Karel Zak <kzak@redhat.com>

 libfdisk/src/dos.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)