/libcore/ojluni/src/main/java/sun/nio/fs/ |
D | UnixException.java | 38 private int errno; field in UnixException 41 UnixException(int errno) { in UnixException() argument 42 this.errno = errno; in UnixException() 47 this.errno = 0; in UnixException() 51 int errno() { in errno() method in UnixException 52 return errno; in errno() 55 void setError(int errno) { in setError() argument 56 this.errno = errno; in setError() 64 return Util.toString(UnixNativeDispatcher.strerror(errno())); in errorString() 83 if (errno() == UnixConstants.EACCES) in translateToIOException() [all …]
|
D | UnixCopyFile.java | 390 if (x.errno() == EXDEV) { in move() 442 (x.errno() == EEXIST || x.errno() == ENOTEMPTY)) in move() 456 if (x.errno() != EXDEV && x.errno() != EISDIR) { in move() 495 (x.errno() == EEXIST || x.errno() == ENOTEMPTY)) in move() 561 (x.errno() == EEXIST || x.errno() == ENOTEMPTY)) in copy()
|
/libcore/luni/src/main/java/android/system/ |
D | OsConstants.java | 998 public static String errnoName(int errno) { in errnoName() argument 999 if (errno == E2BIG) { in errnoName() 1002 if (errno == EACCES) { in errnoName() 1005 if (errno == EADDRINUSE) { in errnoName() 1008 if (errno == EADDRNOTAVAIL) { in errnoName() 1011 if (errno == EAFNOSUPPORT) { in errnoName() 1014 if (errno == EAGAIN) { in errnoName() 1017 if (errno == EALREADY) { in errnoName() 1020 if (errno == EBADF) { in errnoName() 1023 if (errno == EBADMSG) { in errnoName() [all …]
|
D | ErrnoException.java | 35 public final int errno; field in ErrnoException 40 public ErrnoException(String functionName, int errno) { in ErrnoException() argument 42 this.errno = errno; in ErrnoException() 48 public ErrnoException(String functionName, int errno, Throwable cause) { in ErrnoException() argument 51 this.errno = errno; in ErrnoException() 60 String errnoName = OsConstants.errnoName(errno); in getMessage() 62 errnoName = "errno " + errno; in getMessage() 64 String description = Libcore.os.strerror(errno); in getMessage()
|
/libcore/ojluni/src/main/native/ |
D | FileChannelImpl.c | 76 if (errno == EINTR) in handle() 113 if (errno == ENOMEM) { in FileChannelImpl_map0() 176 if (errno == EAGAIN) in FileChannelImpl_transferTo0() 178 if ((errno == EINVAL) && ((ssize_t)count >= 0)) in FileChannelImpl_transferTo0() 180 if (errno == EINTR) { in FileChannelImpl_transferTo0() 205 if (errno == EAGAIN) in FileChannelImpl_transferTo0() 207 if (errno == EOPNOTSUPP) in FileChannelImpl_transferTo0() 209 if ((errno == EINVAL) && ((ssize_t)count >= 0)) in FileChannelImpl_transferTo0() 211 if (errno == EINTR) in FileChannelImpl_transferTo0() 229 if (errno == EAGAIN) in FileChannelImpl_transferTo0() [all …]
|
D | UnixNativeDispatcher.c | 81 } while((_result == -1) && (errno == EINTR)); \ 87 } while((_result == NULL) && (errno == EINTR)); \ 302 throwUnixException(env, errno); in Java_sun_nio_fs_UnixNativeDispatcher_getcwd() 342 throwUnixException(env, errno); in Java_sun_nio_fs_UnixNativeDispatcher_dup() 357 } while (fp == NULL && errno == EINTR); in Java_sun_nio_fs_UnixNativeDispatcher_fopen0() 360 throwUnixException(env, errno); in Java_sun_nio_fs_UnixNativeDispatcher_fopen0() 376 if (fclose(fp) == EOF && errno != EINTR) { in Java_sun_nio_fs_UnixNativeDispatcher_fclose() 377 throwUnixException(env, errno); in Java_sun_nio_fs_UnixNativeDispatcher_fclose() 390 throwUnixException(env, errno); in Java_sun_nio_fs_UnixNativeDispatcher_open0() 409 throwUnixException(env, errno); in Java_sun_nio_fs_UnixNativeDispatcher_openat0() [all …]
|
D | DatagramChannelImpl.c | 132 if (rv < 0 && errno == EADDRNOTAVAIL) in Java_sun_nio_ch_DatagramChannelImpl_disconnect0() 133 rv = errno = 0; in Java_sun_nio_ch_DatagramChannelImpl_disconnect0() 140 if (rv < 0 && errno == EAFNOSUPPORT) in Java_sun_nio_ch_DatagramChannelImpl_disconnect0() 141 rv = errno = 0; in Java_sun_nio_ch_DatagramChannelImpl_disconnect0() 147 handleSocketError(env, errno); in Java_sun_nio_ch_DatagramChannelImpl_disconnect0() 174 if (errno == EWOULDBLOCK) { in Java_sun_nio_ch_DatagramChannelImpl_receive0() 177 if (errno == EINTR) { in Java_sun_nio_ch_DatagramChannelImpl_receive0() 180 if (errno == ECONNREFUSED) { in Java_sun_nio_ch_DatagramChannelImpl_receive0() 189 return handleSocketError(env, errno); in Java_sun_nio_ch_DatagramChannelImpl_receive0() 264 if (errno == EAGAIN) { in Java_sun_nio_ch_DatagramChannelImpl_send0() [all …]
|
D | canonicalize_md.c | 195 errno = EINVAL; in canonicalize() 200 errno = ENAMETOOLONG; in canonicalize() 218 errno = ENAMETOOLONG; in canonicalize() 239 else if (errno == ENOENT || errno == ENOTDIR || errno == EACCES || errno == ENOTCONN) { in canonicalize() 261 errno = ENAMETOOLONG; in canonicalize()
|
D | Net.c | 252 return handleSocketError(env, errno); in Java_sun_nio_ch_Net_socket0() 287 (errno != ENOPROTOOPT)) { in Java_sun_nio_ch_Net_socket0() 328 handleSocketError(env, errno); in Java_sun_nio_ch_Net_bind0() 336 handleSocketError(env, errno); in Java_sun_nio_ch_Net_listen() 355 if (errno == EINPROGRESS) { in Java_sun_nio_ch_Net_connect0() 357 } else if (errno == EINTR) { in Java_sun_nio_ch_Net_connect0() 360 return handleSocketErrorWithDefault(env, errno, JNU_JAVANETPKG "ConnectException"); in Java_sun_nio_ch_Net_connect0() 379 if (errno == ECONNRESET) { in Java_sun_nio_ch_Net_localPort() 394 handleSocketError(env, errno); in Java_sun_nio_ch_Net_localPort() 398 handleSocketError(env, errno); in Java_sun_nio_ch_Net_localPort() [all …]
|
D | linux_close.cpp | 81 } while (rv == -1 && errno == EINTR); in closefd() 92 errno = EBADF; in NET_Dup2() 122 _syscallErrno = errno; \ 125 errno = _wasSignaled ? EBADF : _syscallErrno; \ 126 } while (ret == -1 && errno == EINTR); \ 201 errno = EBADF; in NET_Timeout() 229 syscallErrno = errno; in NET_Timeout() 232 errno = wasSignaled ? EBADF : syscallErrno; in NET_Timeout() 238 if (rv < 0 && errno == EINTR) { in NET_Timeout()
|
D | LinuxNativeDispatcher.c | 91 errno = ENOTSUP; in Java_sun_nio_fs_LinuxNativeDispatcher_fgetxattr0() 97 throwUnixException(env, errno); in Java_sun_nio_fs_LinuxNativeDispatcher_fgetxattr0() 110 errno = ENOTSUP; in Java_sun_nio_fs_LinuxNativeDispatcher_fsetxattr0() 116 throwUnixException(env, errno); in Java_sun_nio_fs_LinuxNativeDispatcher_fsetxattr0() 127 errno = ENOTSUP; in Java_sun_nio_fs_LinuxNativeDispatcher_fremovexattr0() 133 throwUnixException(env, errno); in Java_sun_nio_fs_LinuxNativeDispatcher_fremovexattr0() 144 errno = ENOTSUP; in Java_sun_nio_fs_LinuxNativeDispatcher_flistxattr() 150 throwUnixException(env, errno); in Java_sun_nio_fs_LinuxNativeDispatcher_flistxattr() 164 } while (fp == NULL && errno == EINTR); in Java_sun_nio_fs_LinuxNativeDispatcher_setmntent0() 166 throwUnixException(env, errno); in Java_sun_nio_fs_LinuxNativeDispatcher_setmntent0()
|
D | LinuxWatchService.c | 83 throwUnixException(env, errno); in Java_sun_nio_fs_LinuxWatchService_inotifyInit() 97 throwUnixException(env, errno); in Java_sun_nio_fs_LinuxWatchService_inotifyAddWatch() 108 throwUnixException(env, errno); in Java_sun_nio_fs_LinuxWatchService_inotifyRmWatch() 129 throwUnixException(env, errno); in Java_sun_nio_fs_LinuxWatchService_socketpair() 152 if (errno == EINTR) { in Java_sun_nio_fs_LinuxWatchService_poll() 155 throwUnixException(env, errno); in Java_sun_nio_fs_LinuxWatchService_poll()
|
D | FileSystemPreferences.c | 50 result = errno; in Java_java_util_prefs_FileSystemPreferences_chmod() 92 result[1] = errno; in Java_java_util_prefs_FileSystemPreferences_lockFile0() 106 result[1] = errno; in Java_java_util_prefs_FileSystemPreferences_lockFile0() 144 return (jint)errno; in Java_java_util_prefs_FileSystemPreferences_unlockFile0() 148 return (jint) errno; in Java_java_util_prefs_FileSystemPreferences_unlockFile0()
|
D | UnixCopyFile.c | 38 } while((_result == -1) && (errno == EINTR)); \ 64 throwUnixException(env, errno); in Java_sun_nio_fs_UnixCopyFile_transfer() 78 throwUnixException(env, errno); in Java_sun_nio_fs_UnixCopyFile_transfer()
|
D | UNIXProcess_md.c | 165 } while(((_result) == -1) && (errno == EINTR)); \ 337 switch (errno) { in UNIXProcess_waitForProcessExit() 582 if (errno == ENOEXEC) in execve_with_shell_fallback() 609 errno = ENOENT; in JDK_execvpe() 625 errno = ENAMETOOLONG; in JDK_execvpe() 644 switch (errno) { in JDK_execvpe() 646 sticky_errno = errno; in JDK_execvpe() 668 errno = sticky_errno; in JDK_execvpe() 694 } else if (errno == EINTR) { in readFully() 772 if (restartableClose(fd) == -1 && errno != EBADF) in childProcess() [all …]
|
D | IOUtil.c | 120 if ((n < 0) && (errno != EAGAIN)) in IOUtil_drain() 167 else if (errno == EAGAIN) in convertReturnVal() 169 else if (errno == EINTR) in convertReturnVal() 192 else if (errno == EAGAIN) in convertLongReturnVal() 194 else if (errno == EINTR) in convertLongReturnVal()
|
D | DatagramDispatcher.c | 57 if (result < 0 && errno == ECONNREFUSED) { in Java_sun_nio_ch_DatagramDispatcher_read0() 90 if (result < 0 && errno == ECONNREFUSED) { in Java_sun_nio_ch_DatagramDispatcher_readv0() 104 if (result < 0 && errno == ECONNREFUSED) { in Java_sun_nio_ch_DatagramDispatcher_write0() 135 if (result < 0 && errno == ECONNREFUSED) { in Java_sun_nio_ch_DatagramDispatcher_writev0()
|
D | ServerSocketChannelImpl.c | 112 if (errno != ECONNABORTED) { in Java_sun_nio_ch_ServerSocketChannelImpl_accept0() 120 if (errno == EAGAIN) in Java_sun_nio_ch_ServerSocketChannelImpl_accept0() 122 if (errno == EINTR) in Java_sun_nio_ch_ServerSocketChannelImpl_accept0()
|
D | PollArrayWrapper.c | 38 } while((_result == -1) && (errno == EINTR)); \ 54 if (res < 0 && errno == EINTR) { in ipoll()
|
D | SocketChannelImpl.c | 77 errno = 0; in Java_sun_nio_ch_SocketChannelImpl_checkConnect() 80 handleSocketError(env, errno); in Java_sun_nio_ch_SocketChannelImpl_checkConnect()
|
/libcore/luni/src/test/java/libcore/android/system/ |
D | ErrnoExceptionTest.java | 46 private static void check_messageErrnoAndCause(String msg, String nameOrNull, int errno) { in check_messageErrnoAndCause() argument 48 assertMessageErrnoAndCause(msg, errno, null, new ErrnoException(nameOrNull, errno)); in check_messageErrnoAndCause() 49 assertMessageErrnoAndCause(msg, errno, null, new ErrnoException(nameOrNull, errno, null)); in check_messageErrnoAndCause() 50 assertMessageErrnoAndCause(msg, errno, cause, new ErrnoException(nameOrNull, errno, cause)); in check_messageErrnoAndCause() 53 private static void assertMessageErrnoAndCause(String message, int errno, Throwable cause, in assertMessageErrnoAndCause() argument 56 assertEquals(errno, e.errno); in assertMessageErrnoAndCause()
|
D | OsTest.java | 137 assertEquals(EINVAL, expected.errno); in testFcntlInt_invalidCmd() 149 assertEquals(EBADF, expected.errno); in testFcntlInt_nullFd() 394 (int) expectedErrno, ((ErrnoException) e).errno); in expectException() 496 assertEquals("Expected errno " + bindErrno + " " + msg, bindErrno, e.errno); in expectBindConnectSendtoErrno() 507 assertEquals("Expected errno " + connectErrno + " " + msg, connectErrno, e.errno); in expectBindConnectSendtoErrno() 519 assertEquals("Expected errno " + sendtoErrno + " " + msg, sendtoErrno, e.errno); in expectBindConnectSendtoErrno() 616 assertEquals(expectedException.errno, EACCES); in test_NetlinkSocket() 775 assumeTrue(e.errno != EAFNOSUPPORT && e.errno != EACCES); 1076 expected.errno); 1102 expected.errno); [all …]
|
/libcore/luni/src/main/java/libcore/io/ |
D | IoBridge.java | 119 if (errnoException.errno == ENOTTY) { in available() 148 if (errnoException.errno == EADDRINUSE || errnoException.errno == EADDRNOTAVAIL || in bind() 149 errnoException.errno == EPERM || errnoException.errno == EACCES) { in bind() 182 if (errnoException.errno == EHOSTUNREACH) { in connect() 185 if (errnoException.errno == EADDRNOTAVAIL) { in connect() 223 if (errnoException.errno != EINPROGRESS) { in connectErrno() 344 if (cause.errno == ETIMEDOUT) { in isConnected() 612 if (errnoException.errno == EAGAIN) { in read() 714 if (errnoException.errno == ECONNREFUSED) { in maybeThrowAfterSendto() 718 if (errnoException.errno == EAGAIN) { in maybeThrowAfterSendto() [all …]
|
/libcore/luni/src/test/native/ |
D | libcore_java_io_FileTest.cpp | 39 jniThrowIOException(env, errno); in Java_libcore_java_io_FileTest_nativeTestFilesWithSurrogatePairs() 47 jniThrowIOException(env, errno); in Java_libcore_java_io_FileTest_nativeTestFilesWithSurrogatePairs()
|
/libcore/ojluni/src/main/java/java/net/ |
D | Inet6AddressImpl.java | 148 int errno = ((ErrnoException) gaiException.getCause()).errno; in lookupHostByName() 149 if (errno == EACCES || errno == EPERM) { in lookupHostByName() 235 && ((ErrnoException) cause).errno == ECONNREFUSED; in tcpEcho()
|