util-linux/disk-utils
Andreas Henriksson aeda8dc3d0 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
2018-06-18 10:42:36 +02:00
..
Makemodule.am partx: move partx.h to include/ 2017-07-14 11:34:55 +02:00
addpart.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
addpart.c misc: consolidate macro style USAGE_HELP_OPTIONS 2017-06-29 16:54:33 +02:00
blockdev.8 blockdev: be more explicit for BLKSSZ in blockdev.8 2017-11-13 12:15:17 +01:00
blockdev.c misc: consolidate macro style USAGE_HELP_OPTIONS 2017-06-29 16:54:33 +02:00
cfdisk.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
cfdisk.c cfdisk: fix compiler warnings, follow-up 7085f1e4 (#636) 2018-05-24 16:31:43 +02:00
cramfs.h libfdisk: (docs) update year 2018-03-20 18:55:49 +01:00
cramfs_common.c libfdisk: (docs) update year 2018-03-20 18:55:49 +01:00
delpart.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
delpart.c misc: consolidate macro style USAGE_HELP_OPTIONS 2017-06-29 16:54:33 +02:00
fdformat.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
fdformat.c misc: consolidate macro style USAGE_HELP_OPTIONS 2017-06-29 16:54:33 +02:00
fdisk-list.c libblkid: ignore private Stratis devices 2018-03-09 13:34:42 +01:00
fdisk-list.h sfdisk: support empty label use-case 2016-11-30 13:01:33 +01:00
fdisk-menu.c misc: fix typos using codespell 2018-02-16 11:12:52 +01:00
fdisk.8 fdisk: add to the man page missing option 2017-05-09 13:05:26 +02:00
fdisk.c nls: remove translation strings 2018-05-28 13:36:38 +02:00
fdisk.h fdisk: fix readline interaction with signals 2017-08-24 15:48:46 +02:00
fsck.8 man: Use the correct macro for a font change of one argument 2018-05-23 10:43:27 +02:00
fsck.c fsck: cleanup find_fsck() 2018-02-19 13:05:45 +01:00
fsck.cramfs.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
fsck.cramfs.c misc: fix typos using codespell 2018-02-16 11:12:52 +01:00
fsck.minix.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
fsck.minix.c misc: consolidate macro style USAGE_HELP_OPTIONS 2017-06-29 16:54:33 +02:00
isosize.8 isosize: iterate over all arguments even when something fails 2017-08-21 11:11:11 +02:00
isosize.c isosize: usage() and coding style cleanup 2017-08-21 11:16:51 +02:00
minix_programs.h minix: change types in header file 2012-12-19 11:38:51 +01:00
mkfs.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
mkfs.bfs.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
mkfs.bfs.c misc: consolidate macro style USAGE_HELP_OPTIONS 2017-06-29 16:54:33 +02:00
mkfs.c misc: consolidate macro style USAGE_HELP_OPTIONS 2017-06-29 16:54:33 +02:00
mkfs.cramfs.8 docs: remove some old history from manpages 2017-06-29 12:56:22 +02:00
mkfs.cramfs.c misc: fix typos using codespell 2018-02-16 11:12:52 +01:00
mkfs.minix.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
mkfs.minix.c misc: consolidate macro style USAGE_HELP_OPTIONS 2017-06-29 16:54:33 +02:00
mkswap.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
mkswap.c misc: replace magic number 37 with UUID_STR_LEN 2017-09-05 11:49:21 +02:00
partx.8 man: Use the correct macro for a font change of one argument 2018-05-23 10:43:27 +02:00
partx.c partx: exit with error code when partition read failed 2018-06-18 10:42:36 +02:00
raw.8 docs: try to convince open(2) O_DIRECT rather than using raw device 2017-05-02 23:22:04 +01:00
raw.c misc: consolidate macro style USAGE_HELP_OPTIONS 2017-06-29 16:54:33 +02:00
resizepart.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
resizepart.c misc: consolidate macro style USAGE_HELP_OPTIONS 2017-06-29 16:54:33 +02:00
sfdisk.8 man: Use the correct macro for a font change of one argument 2018-05-23 10:43:27 +02:00
sfdisk.c include/debug: introduce __UL_INIT_DEBUG_FROM_STRING() 2018-01-17 13:58:29 +01:00
swaplabel.8 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
swaplabel.c swaplabel: fix --disable-libuuid compilation 2017-09-15 13:30:40 +02:00