diff --git a/src/hci/strerror.c b/src/hci/strerror.c index 30532b39..8e7d878b 100644 --- a/src/hci/strerror.c +++ b/src/hci/strerror.c @@ -115,5 +115,6 @@ struct errortab common_errors[] __errortab = { { ENOSPC, "No space left on device" }, { ENOTSUP, "Not supported" }, { EPERM, "Operation not permitted" }, + { ERANGE, "Out of range" }, { ETIMEDOUT, "Connection timed out" }, }; diff --git a/src/image/segment.c b/src/image/segment.c index 9bd60f9c..3d2b8a4b 100644 --- a/src/image/segment.c +++ b/src/image/segment.c @@ -26,6 +26,7 @@ #include #include #include +#include #include /** @@ -72,3 +73,13 @@ int prep_segment ( userptr_t segment, size_t filesz, size_t memsz ) { start, mid, end ); return -ERANGE; } + +/** + * Segment-specific error messages + * + * This error happens sufficiently often to merit a user-friendly + * description. + */ +struct errortab segment_errors[] __errortab = { + { ERANGE, "Requested memory not available" }, +};