]> git.ipfire.org Git - thirdparty/util-linux.git/commit
partx: exit with error code when partition read failed
authorAndreas Henriksson <andreas@fatal.se>
Sun, 17 Jun 2018 12:49:15 +0000 (14:49 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 11 Jul 2018 14:11:25 +0000 (16:11 +0200)
commitb39f9862ee0cf867ff0afd0be1531063ca3263f9
tree6841180bb29b960b50c83f026244d098add00c0a
parentba560e7b02d894fafa3ce79468652d97416f0fc9
partx: exit with error code when partition read failed

Make sure partx exits with a non-0 return code when
it runs into either code-path where getting the partition
table failed (or wasn't even attempted because of previous
error condition).

Change was tested using:
touch /tmp/foobar
partx -s - /tmp/foobar

Previously that was only printing an error/warning message
and then exiting with 0, but after this change it exits
with 1.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Reported-by: Juan Céspedes <cespedes@debian.org>
Addresses: https://bugs.debian.org/898426
disk-utils/partx.c