From: Theodore Ts'o Date: Wed, 8 Jan 2020 15:59:37 +0000 (-0500) Subject: libcom_err: deal with the fact that the Hurd error messages are not zero-based X-Git-Tag: archive/debian/1.45.5-2~1^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00179a29867b72c47e074d8e0babe6622d074dba;p=thirdparty%2Fe2fsprogs.git libcom_err: deal with the fact that the Hurd error messages are not zero-based Signed-off-by: Theodore Ts'o --- diff --git a/debian/changelog b/debian/changelog index d26f8db38..bf82d154b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +e2fsprogs (1.45.5-2) unstable; urgency=medium + + * Fix com_err support on Hurd, which has POSIX E* error code starting at + 0x40000000. Otherwise the regression tests will fail since the + expected output for various error cases will not have the correct + error text. + + -- Theodore Y. Ts'o Wed, 08 Jan 2020 15:58:44 -0500 + e2fsprogs (1.45.5-1) unstable; urgency=medium * New upstream feature diff --git a/lib/et/error_message.c b/lib/et/error_message.c index bd18be781..cd9f57f56 100644 --- a/lib/et/error_message.c +++ b/lib/et/error_message.c @@ -113,6 +113,11 @@ gettextf set_com_err_gettext(gettextf new_proc) return x; } +#ifdef __GNU__ +#define SYS_ERR_BASE 0x40000000 +#else +#define SYS_ERR_BASE 0 +#endif const char * error_message (errcode_t code) { @@ -124,14 +129,14 @@ const char * error_message (errcode_t code) offset = (int) (code & ((1<