Signed-off-by: Theodore Ts'o <tytso@mit.edu>
+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 <tytso@mit.edu> Wed, 08 Jan 2020 15:58:44 -0500
+
e2fsprogs (1.45.5-1) unstable; urgency=medium
* New upstream feature
return x;
}
+#ifdef __GNU__
+#define SYS_ERR_BASE 0x40000000
+#else
+#define SYS_ERR_BASE 0
+#endif
const char * error_message (errcode_t code)
{
offset = (int) (code & ((1<<ERRCODE_RANGE)-1));
table_num = code - offset;
- if (!table_num) {
+ if (table_num == SYS_ERR_BASE) {
#ifdef HAS_SYS_ERRLIST
- if (offset < sys_nerr)
- return(sys_errlist[offset]);
+ if (code < sys_nerr)
+ return(sys_errlist[code]);
else
goto oops;
#else
- cp = strerror(offset);
+ cp = strerror(code);
if (cp)
return(cp);
else