Commit 28ea43ab authored by Mark Andrews's avatar Mark Andrews Committed by Evan Hunt
Browse files

Handle EDQUOT and ENOSPC errors

(cherry picked from commit 435ae2f2)
parent bd7dc548
Pipeline #11468 passed with stages
in 14 minutes and 11 seconds
5178. [bug] Handle EDQUOT (disk quota) and ENOSPC (disk full)
errors when writing files. [GL #902]
5176. [tests] Remove a dependency on libxml in statschannel system 5176. [tests] Remove a dependency on libxml in statschannel system
test. [GL #926] test. [GL #926]
   
......
...@@ -83,9 +83,13 @@ ...@@ -83,9 +83,13 @@
#define ISC_R_UNSET 61 /*%< unset */ #define ISC_R_UNSET 61 /*%< unset */
#define ISC_R_MULTIPLE 62 /*%< multiple */ #define ISC_R_MULTIPLE 62 /*%< multiple */
#define ISC_R_WOULDBLOCK 63 /*%< would block */ #define ISC_R_WOULDBLOCK 63 /*%< would block */
#define ISC_R_COMPLETE 64 /*%< complete */
#define ISC_R_CRYPTOFAILURE 65 /*%< cryptography library failure */
#define ISC_R_DISCQUOTA 66 /*%< disc quota */
#define ISC_R_DISCFULL 67 /*%< disc full */
/*% Not a result code: the number of results. */ /*% Not a result code: the number of results. */
#define ISC_R_NRESULTS 64 #define ISC_R_NRESULTS 68
ISC_LANG_BEGINDECLS ISC_LANG_BEGINDECLS
......
...@@ -99,6 +99,10 @@ static const char *description[ISC_R_NRESULTS] = { ...@@ -99,6 +99,10 @@ static const char *description[ISC_R_NRESULTS] = {
"unset", /*%< 61 */ "unset", /*%< 61 */
"multiple", /*%< 62 */ "multiple", /*%< 62 */
"would block", /*%< 63 */ "would block", /*%< 63 */
"complete", /*%< 64 */
"crypto failure", /*%< 65 */
"disc quota", /*%< 66 */
"disc full", /*%< 67 */
}; };
static const char *identifier[ISC_R_NRESULTS] = { static const char *identifier[ISC_R_NRESULTS] = {
...@@ -166,6 +170,10 @@ static const char *identifier[ISC_R_NRESULTS] = { ...@@ -166,6 +170,10 @@ static const char *identifier[ISC_R_NRESULTS] = {
"ISC_R_UNSET", "ISC_R_UNSET",
"ISC_R_MULTIPLE", "ISC_R_MULTIPLE",
"ISC_R_WOULDBLOCK", "ISC_R_WOULDBLOCK",
"ISC_R_COMPLETE",
"ISC_R_CRYPTOFAILURE",
"ISC_R_DISCQUOTA",
"ISC_R_DISCFULL",
}; };
#define ISC_RESULT_RESULTSET 2 #define ISC_RESULT_RESULTSET 2
......
...@@ -55,6 +55,12 @@ isc___errno2result(int posixerrno, bool dolog, ...@@ -55,6 +55,12 @@ isc___errno2result(int posixerrno, bool dolog,
case ENFILE: case ENFILE:
case EMFILE: case EMFILE:
return (ISC_R_TOOMANYOPENFILES); return (ISC_R_TOOMANYOPENFILES);
#ifdef EDQUOT
case EDQUOT:
return (ISC_R_DISCQUOTA);
#endif
case ENOSPC:
return (ISC_R_DISCFULL);
#ifdef EOVERFLOW #ifdef EOVERFLOW
case EOVERFLOW: case EOVERFLOW:
return (ISC_R_RANGE); return (ISC_R_RANGE);
......
...@@ -62,6 +62,8 @@ isc__errno2resultx(int posixerrno, bool dolog, ...@@ -62,6 +62,8 @@ isc__errno2resultx(int posixerrno, bool dolog,
case EMFILE: case EMFILE:
case WSAEMFILE: case WSAEMFILE:
return (ISC_R_TOOMANYOPENFILES); return (ISC_R_TOOMANYOPENFILES);
case ENOSPC:
return (ISC_R_DISCFULL);
case ERROR_CANCELLED: case ERROR_CANCELLED:
return (ISC_R_CANCELED); return (ISC_R_CANCELED);
case ERROR_CONNECTION_REFUSED: case ERROR_CONNECTION_REFUSED:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment