diff options
Diffstat (limited to 'src/unix/os390.c')
-rw-r--r-- | src/unix/os390.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/unix/os390.c b/src/unix/os390.c index 081438e..f766b39 100644 --- a/src/unix/os390.c +++ b/src/unix/os390.c @@ -122,7 +122,7 @@ int uv__platform_loop_init(uv_loop_t* loop) { ep = epoll_create1(0); loop->ep = ep; if (ep == NULL) - return -errno; + return UV__ERR(errno); return 0; } @@ -259,12 +259,12 @@ int uv_exepath(char* buffer, size_t* size) { int pid; if (buffer == NULL || size == NULL || *size == 0) - return -EINVAL; + return UV_EINVAL; pid = getpid(); res = getexe(pid, args, sizeof(args)); if (res < 0) - return -EINVAL; + return UV_EINVAL; /* * Possibilities for args: @@ -277,7 +277,7 @@ int uv_exepath(char* buffer, size_t* size) { /* Case i) and ii) absolute or relative paths */ if (strchr(args, '/') != NULL) { if (realpath(args, abspath) != abspath) - return -errno; + return UV__ERR(errno); abspath_size = strlen(abspath); @@ -297,11 +297,11 @@ int uv_exepath(char* buffer, size_t* size) { char* path = getenv("PATH"); if (path == NULL) - return -EINVAL; + return UV_EINVAL; clonedpath = uv__strdup(path); if (clonedpath == NULL) - return -ENOMEM; + return UV_ENOMEM; token = strtok(clonedpath, ":"); while (token != NULL) { @@ -327,7 +327,7 @@ int uv_exepath(char* buffer, size_t* size) { uv__free(clonedpath); /* Out of tokens (path entries), and no match found */ - return -EINVAL; + return UV_EINVAL; } } @@ -407,7 +407,7 @@ int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) { *cpu_infos = uv__malloc(*count * sizeof(uv_cpu_info_t)); if (!*cpu_infos) - return -ENOMEM; + return UV_ENOMEM; cpu_info = *cpu_infos; idx = 0; @@ -452,7 +452,7 @@ static int uv__interface_addresses_v6(uv_interface_address_t** addresses, maxsize = 16384; if (0 > (sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP))) - return -errno; + return UV__ERR(errno); ifc.__nif6h_version = 1; ifc.__nif6h_buflen = maxsize; @@ -460,7 +460,7 @@ static int uv__interface_addresses_v6(uv_interface_address_t** addresses, if (ioctl(sockfd, SIOCGIFCONF6, &ifc) == -1) { uv__close(sockfd); - return -errno; + return UV__ERR(errno); } @@ -484,7 +484,7 @@ static int uv__interface_addresses_v6(uv_interface_address_t** addresses, *addresses = uv__malloc(*count * sizeof(uv_interface_address_t)); if (!(*addresses)) { uv__close(sockfd); - return -ENOMEM; + return UV_ENOMEM; } address = *addresses; @@ -543,13 +543,13 @@ int uv_interface_addresses(uv_interface_address_t** addresses, int* count) { sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP); if (0 > sockfd) - return -errno; + return UV__ERR(errno); ifc.ifc_req = uv__calloc(1, maxsize); ifc.ifc_len = maxsize; if (ioctl(sockfd, SIOCGIFCONF, &ifc) == -1) { uv__close(sockfd); - return -errno; + return UV__ERR(errno); } #define MAX(a,b) (((a)>(b))?(a):(b)) @@ -569,7 +569,7 @@ int uv_interface_addresses(uv_interface_address_t** addresses, int* count) { memcpy(flg.ifr_name, p->ifr_name, sizeof(flg.ifr_name)); if (ioctl(sockfd, SIOCGIFFLAGS, &flg) == -1) { uv__close(sockfd); - return -errno; + return UV__ERR(errno); } if (!(flg.ifr_flags & IFF_UP && flg.ifr_flags & IFF_RUNNING)) @@ -584,7 +584,7 @@ int uv_interface_addresses(uv_interface_address_t** addresses, int* count) { if (!(*addresses)) { uv__close(sockfd); - return -ENOMEM; + return UV_ENOMEM; } address = *addresses; @@ -607,7 +607,7 @@ int uv_interface_addresses(uv_interface_address_t** addresses, int* count) { memcpy(flg.ifr_name, p->ifr_name, sizeof(flg.ifr_name)); if (ioctl(sockfd, SIOCGIFFLAGS, &flg) == -1) { uv__close(sockfd); - return -ENOSYS; + return UV_ENOSYS; } if (!(flg.ifr_flags & IFF_UP && flg.ifr_flags & IFF_RUNNING)) @@ -706,7 +706,7 @@ int uv_fs_event_start(uv_fs_event_t* handle, uv_fs_event_cb cb, int rc; if (uv__is_active(handle)) - return -EINVAL; + return UV_EINVAL; ep = handle->loop->ep; assert(ep->msg_queue != -1); @@ -718,11 +718,11 @@ int uv_fs_event_start(uv_fs_event_t* handle, uv_fs_event_cb cb, path = uv__strdup(filename); if (path == NULL) - return -ENOMEM; + return UV_ENOMEM; rc = __w_pioctl(path, _IOCC_REGFILEINT, sizeof(reg_struct), ®_struct); if (rc != 0) - return -errno; + return UV__ERR(errno); uv__handle_start(handle); handle->path = path; |