]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit - io/stat.c
xfs_io: set exitcode on failure appropriately
authorDave Chinner <dchinner@redhat.com>
Wed, 8 Apr 2020 13:48:15 +0000 (09:48 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 8 Apr 2020 13:48:15 +0000 (09:48 -0400)
commit9e1595e63d5ea4018e64220688845c9c72079cf4
tree04610ca60963ea5e29f3580a3e72c70129b74408
parent78aeaffda9996d2db98130d2bffdc3ae17539e83
xfs_io: set exitcode on failure appropriately

Many operations don't set the exitcode when they fail, resulting
in xfs_io exiting with a zero (no failure) exit code despite the
command failing and returning an error. The command return code is
really a boolean to tell the libxcmd command loop whether to
continue processing or not, while exitcode is the actual xfs_io exit
code returned to the parent on exit.

This patchset just makes the code do the right thing. It's not the
nicest code, but it's a start at producing correct behaviour.

Signed-Off-By: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
32 files changed:
io/attr.c
io/copy_file_range.c
io/cowextsize.c
io/encrypt.c
io/fadvise.c
io/fiemap.c
io/file.c
io/fsmap.c
io/fsync.c
io/getrusage.c
io/imap.c
io/inject.c
io/link.c
io/log_writes.c
io/madvise.c
io/mincore.c
io/mmap.c
io/open.c
io/parent.c
io/pread.c
io/prealloc.c
io/pwrite.c
io/readdir.c
io/reflink.c
io/resblks.c
io/seek.c
io/sendfile.c
io/shutdown.c
io/stat.c
io/sync_file_range.c
io/truncate.c
io/utimes.c