common: Return better CUPS error codes, and document them.

This commit is contained in:
Solomon Peachy 2013-09-30 15:15:28 +01:00
parent 6ce1ab9768
commit be8eec4f2d
2 changed files with 3 additions and 3 deletions

View File

@ -508,7 +508,7 @@ int main (int argc, char **argv)
if (!query_only && backend->early_parse) {
printer_type = backend->early_parse(backend_ctx, data_fd);
if (printer_type < 0) {
ret = 4;
ret = 5; /* CUPS_BACKEND_CANCEL */
goto done;
}
}
@ -520,7 +520,7 @@ int main (int argc, char **argv)
if (found == -1) {
ERROR("Printer open failure (No suitable printers found!)\n");
ret = 3;
ret = 4; /* CUPS_BACKEND_STOP */
goto done;
}

View File

@ -1617,7 +1617,7 @@ printer_error:
status_str(sts->hdr.status),
sts->hdr.printer_major, sts->hdr.printer_minor,
error_codes(sts->hdr.printer_major, sts->hdr.printer_minor));
return 1;
return 1; /* CUPS_BACKEND_FAILED */
}
static int shinkos2145_query_serno(struct libusb_device_handle *dev, uint8_t endp_up, uint8_t endp_down, char *buf, int buf_len)