47 #if defined( MBG_TGT_WIN32 ) && !defined( MBG_TGT_KERNEL ) 57 #if defined( MBG_TGT_LINUX ) 58 int cmp_rc_code = -sys_errno;
60 int cmp_rc_code = sys_errno;
63 switch ( cmp_rc_code )
71 case IOCTL_RC_ERR_DEV_ACCESS:
return MBG_ERR_IO;
73 #if defined( MBG_TGT_LINUX ) // Linux-specific codes 76 #endif // defined( MBG_TGT_LINUX ) 88 #endif // defined( MBG_TGT_WIN32 ) && !defined( MBG_TGT_KERNEL ) 92 #if defined( DEBUG ) || defined( MBG_DEBUG ) 101 for ( p = tbl; p->
name; p++ )
103 if ( p->
code == code )
107 return "UNKNOWN_IOCTL";
111 #endif // defined( DEBUG ) || defined( MBG_DEBUG ) 113 #endif // MBG_TGT_USE_IOCTL const char * mbgioctl_get_name(long code)
#define MBG_ERR_INV_PARM
Invalid parameter.
A table entry which can be used to map codes to names.
#define MBG_ERR_COPY_TO_USER
Kernel driver failed to copy data from kernel to user space.
int mbg_posix_errno_to_mbg(int posix_errno, const char *info)
Translate a POSIX errno error code to one of the MBG_ERROR_CODES.
#define MBG_ERR_IRQ_UNSAFE
Enabled IRQ of bus-level device is unsafe with this firmware/ASIC version.
#define MBG_ERR_IO
Input/output error.
#define MBG_ERR_INV_DEV_REQUEST
IOCTL call not supported by driver.
#define MBG_ERR_NO_MEM
Failed to allocate memory.
#define MBG_ERR_PERM
Operation not permitted, e.g. when trying to set the system time without sufficient permissions...
#define IOCTL_CODES_TABLE
An initializer for a table of IOCTL codes and associated names.
#define MBG_ERR_NOT_SUPP_BY_DEV
Command or feature not supported by device.
int mbgioctl_rc_to_mbg_errno(int sys_errno)