Skip to content

Commit

Permalink
use -EIO instead of -EREMOTEIO
Browse files Browse the repository at this point in the history
The BSDs don't have EREMOTEIO, and all we really care about is an error
occurred, so use one that all systems should have.
  • Loading branch information
gregkh committed Jun 28, 2013
1 parent 27d6caa commit 7dc7db4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bti.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ static int parse_response_json(char *document, struct session *session)
results.code, results.message); results.code, results.message);
fprintf(stderr, "error condition detected: %d = %s\n", fprintf(stderr, "error condition detected: %d = %s\n",
results.code, results.message); results.code, results.message);
return -EREMOTEIO; return -EIO;
} }
return 0; return 0;
} }
Expand Down Expand Up @@ -727,13 +727,13 @@ static int parse_response_xml(char *document, struct session *session)
"response.xml", NULL, "response.xml", NULL,
XML_PARSE_NOERROR); XML_PARSE_NOERROR);
if (doc == NULL) if (doc == NULL)
return -EREMOTEIO; return -EIO;


current = xmlDocGetRootElement(doc); current = xmlDocGetRootElement(doc);
if (current == NULL) { if (current == NULL) {
fprintf(stderr, "empty document\n"); fprintf(stderr, "empty document\n");
xmlFreeDoc(doc); xmlFreeDoc(doc);
return -EREMOTEIO; return -EIO;
} }


if (xmlStrcmp(current->name, (const xmlChar *) "status")) { if (xmlStrcmp(current->name, (const xmlChar *) "status")) {
Expand All @@ -742,7 +742,7 @@ static int parse_response_xml(char *document, struct session *session)
&& xmlStrcmp(current->name, (const xmlChar *) "errors")) { && xmlStrcmp(current->name, (const xmlChar *) "errors")) {
fprintf(stderr, "unexpected document type\n"); fprintf(stderr, "unexpected document type\n");
xmlFreeDoc(doc); xmlFreeDoc(doc);
return -EREMOTEIO; return -EIO;
} else { } else {
xmlChar *text=NULL; xmlChar *text=NULL;
while (current != NULL) { while (current != NULL) {
Expand All @@ -764,7 +764,7 @@ static int parse_response_xml(char *document, struct session *session)
fprintf(stderr, "unknown error condition\n"); fprintf(stderr, "unknown error condition\n");


xmlFreeDoc(doc); xmlFreeDoc(doc);
return -EREMOTEIO; return -EIO;
} }
} }
} }
Expand Down

0 comments on commit 7dc7db4

Please sign in to comment.