]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
libxfs: don't pass negative errnos to strerror()
authorEric Sandeen <sandeen@redhat.com>
Thu, 4 Feb 2016 21:34:58 +0000 (08:34 +1100)
committerDave Chinner <david@fromorbit.com>
Thu, 4 Feb 2016 21:34:58 +0000 (08:34 +1100)
commit11202ec2c80e69d075054802a5e6ddac8b33548a
treea656ac232a0793c98bb14ec2698c3654cc6becee
parent7c66b2fd409b38b3e245258dbd41aca798736529
libxfs: don't pass negative errnos to strerror()

The error negation work in 12b5319 tripped up a little bit
when we're reporting errors via strerror().  By negating
the error before passing it to strerror, we get i.e.

   mkfs.xfs: pwrite64 failed: Unknown error -22

Keep the error positive, but return -error, just as we
do in the else clauses in these functions.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
libxfs/rdwr.c