#include <IOKit/IOCFBundle.h>
#include <IOKit/IOCFPlugIn.h>
#include <IOKit/usb/IOUSBLib.h>
#include <IOKit/IOKitLib.h>
Go to the source code of this file.
Defines | |
#define | LUSBDARWINSTALL (ELAST+1) |
#define | USB_ERROR(r, x) |
#define | USB_ERROR_STR(r, x, format, args...) |
#define | USB_ERROR_STR_ORIG(x, format, args...) |
#define | USB_ERROR_STR_NO_RET(x, format, args...) |
Enumerations | |
enum | usb_error_type_t { USB_ERROR_TYPE_NONE = 0, USB_ERROR_TYPE_STRING, USB_ERROR_TYPE_ERRNO } |
Functions | |
static char * | darwin_error_str (int result) |
static int | darwin_to_errno (int result) |
static int | ep_to_pipeRef (darwin_dev_handle *device, int ep) |
Variables | |
char | usb_error_str [1024] |
int | usb_error_errno |
usb_error_type_t | usb_error_type |
#define LUSBDARWINSTALL (ELAST+1) |
Referenced by darwin_to_errno().
#define USB_ERROR | ( | r, | |||
x | ) |
Value:
do { \ usb_error_type = USB_ERROR_TYPE_ERRNO; \ usb_error_errno = x; \ return r; \ } while (0)
#define USB_ERROR_STR | ( | r, | |||
x, | |||||
format, | |||||
args... | ) |
Value:
do { \ usb_error_type = USB_ERROR_TYPE_STRING; \ snprintf(usb_error_str, sizeof(usb_error_str) - 1, format, ## args); \ if (usb_debug) \ fprintf(stderr, "USB error: %s\n", usb_error_str); \ return r; \ } while (0)
#define USB_ERROR_STR_NO_RET | ( | x, | |||
format, | |||||
args... | ) |
Value:
do { \ usb_error_type = USB_ERROR_TYPE_STRING; \ snprintf(usb_error_str, sizeof(usb_error_str) - 1, format, ## args); \ if (usb_debug) \ fprintf(stderr, "USB error: %s\n", usb_error_str); \ } while (0)
#define USB_ERROR_STR_ORIG | ( | x, | |||
format, | |||||
args... | ) |
Value:
do { \ usb_error_type = USB_ERROR_TYPE_STRING; \ snprintf(usb_error_str, sizeof(usb_error_str) - 1, format, ## args); \ if (usb_debug) \ fprintf(stderr, "USB error: %s\n", usb_error_str); \ return x; \ } while (0)
Referenced by ep_to_pipeRef().
enum usb_error_type_t |
static char* darwin_error_str | ( | int | result | ) | [static] |
Referenced by ep_to_pipeRef().
static int darwin_to_errno | ( | int | result | ) | [static] |
static int ep_to_pipeRef | ( | darwin_dev_handle * | device, | |
int | ep | |||
) | [static] |
References darwin_error_str(), darwin_to_errno(), darwin_dev_handle::interface, and USB_ERROR_STR_ORIG.
int usb_error_errno |
char usb_error_str[1024] |