Android-cuttlefish cvd tool
Macros | Functions | Variables
errno.cpp File Reference
#include "sysdeps/errno.h"
#include <thread>
#include <unordered_map>
#include <utility>
#include "adb.h"
Include dependency graph for errno.cpp:

Macros

#define ERRNO_VALUES()
 
#define ERRNO_VALUE(error_name, wire_value)    result->insert(std::make_pair((error_name), (wire_value)))
 
#define ERRNO_VALUE(error_name, wire_value)    result->insert(std::make_pair((wire_value), (error_name)))
 

Functions

static std::unordered_map< int, int > * generate_host_to_wire ()
 
static std::unordered_map< int, int > * generate_wire_to_host ()
 
int errno_to_wire (int error)
 
int errno_from_wire (int error)
 

Variables

static std::unordered_map< int, int > & host_to_wire = *generate_host_to_wire()
 
static std::unordered_map< int, int > & wire_to_host = *generate_wire_to_host()
 

Macro Definition Documentation

◆ ERRNO_VALUE [1/2]

#define ERRNO_VALUE (   error_name,
  wire_value 
)     result->insert(std::make_pair((error_name), (wire_value)))

◆ ERRNO_VALUE [2/2]

#define ERRNO_VALUE (   error_name,
  wire_value 
)     result->insert(std::make_pair((wire_value), (error_name)))

◆ ERRNO_VALUES

#define ERRNO_VALUES ( )
Value:
ERRNO_VALUE(EACCES, 13); \
ERRNO_VALUE(EEXIST, 17); \
ERRNO_VALUE(EFAULT, 14); \
ERRNO_VALUE(EFBIG, 27); \
ERRNO_VALUE(EINTR, 4); \
ERRNO_VALUE(EINVAL, 22); \
ERRNO_VALUE(EIO, 5); \
ERRNO_VALUE(EISDIR, 21); \
ERRNO_VALUE(ELOOP, 40); \
ERRNO_VALUE(EMFILE, 24); \
ERRNO_VALUE(ENAMETOOLONG, 36); \
ERRNO_VALUE(ENFILE, 23); \
ERRNO_VALUE(ENOENT, 2); \
ERRNO_VALUE(ENOMEM, 12); \
ERRNO_VALUE(ENOSPC, 28); \
ERRNO_VALUE(ENOTDIR, 20); \
ERRNO_VALUE(EOVERFLOW, 75); \
ERRNO_VALUE(EPERM, 1); \
ERRNO_VALUE(EROFS, 30); \
ERRNO_VALUE(ETXTBSY, 26)
#define ERRNO_VALUE(error_name, wire_value)

Function Documentation

◆ errno_from_wire()

int errno_from_wire ( int  error)

◆ errno_to_wire()

int errno_to_wire ( int  error)

◆ generate_host_to_wire()

static std::unordered_map< int, int > * generate_host_to_wire ( )
static

◆ generate_wire_to_host()

static std::unordered_map< int, int > * generate_wire_to_host ( )
static

Variable Documentation

◆ host_to_wire

std::unordered_map<int, int>& host_to_wire = *generate_host_to_wire()
static

◆ wire_to_host

std::unordered_map<int, int>& wire_to_host = *generate_wire_to_host()
static