2 * ========================================================================
3 * Copyright 2013-2022 Eduardo Chappa
4 * Copyright 2006 University of Washington
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * ========================================================================
19 /*----------------------------------------------------------------------
20 Return string describing the error
22 Args: errnumber -- The system error number (errno)
24 Result: long string describing the error is returned
27 error_description(int errnumber
)
29 static char buffer
[50+1];
34 snprintf(buffer
, sizeof(buffer
), "%s", strerror(errnumber
));
36 snprintf(buffer
, sizeof(buffer
), "Unknown error #%d", errnumber
);
38 return ( (char *) buffer
);