Home
last modified time | relevance | path

Searched refs:errno (Results 1 – 25 of 59) sorted by relevance

123

/libcore/luni/src/main/java/android/system/
DOsConstants.java804 public static String errnoName(int errno) { in errnoName() argument
805 if (errno == E2BIG) { in errnoName()
808 if (errno == EACCES) { in errnoName()
811 if (errno == EADDRINUSE) { in errnoName()
814 if (errno == EADDRNOTAVAIL) { in errnoName()
817 if (errno == EAFNOSUPPORT) { in errnoName()
820 if (errno == EAGAIN) { in errnoName()
823 if (errno == EALREADY) { in errnoName()
826 if (errno == EBADF) { in errnoName()
829 if (errno == EBADMSG) { in errnoName()
[all …]
DErrnoException.java35 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/java/sun/nio/fs/
DUnixException.java38 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 …]
DUnixCopyFile.java390 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/ojluni/src/main/native/
DFileChannelImpl.c76 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 …]
DUnixNativeDispatcher.c81 } 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 …]
DDatagramChannelImpl.c132 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 …]
Dcanonicalize_md.c195 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()
DNet.c252 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 …]
Dlinux_close.cpp81 } 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()
DLinuxNativeDispatcher.c91 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()
DLinuxWatchService.c83 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()
DFileSystemPreferences.c50 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()
DUnixCopyFile.c38 } 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()
DIOUtil.c120 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()
DUNIXProcess_md.c165 } 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 …]
DDatagramDispatcher.c57 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()
DServerSocketChannelImpl.c112 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()
DPollArrayWrapper.c38 } while((_result == -1) && (errno == EINTR)); \
54 if (res < 0 && errno == EINTR) { in ipoll()
DSocketChannelImpl.c77 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/
DErrnoExceptionTest.java46 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()
DOsTest.java114 assertEquals(EINVAL, expected.errno); in testFcntlInt_invalidCmd()
125 assertEquals(EBADF, expected.errno); in testFcntlInt_nullFd()
368 (int) expectedErrno, ((ErrnoException) e).errno); in expectException()
469 assertEquals("Expected errno " + bindErrno + " " + msg, bindErrno, e.errno); in expectBindConnectSendtoErrno()
480 assertEquals("Expected errno " + connectErrno + " " + msg, connectErrno, e.errno); in expectBindConnectSendtoErrno()
492 assertEquals("Expected errno " + sendtoErrno + " " + msg, sendtoErrno, e.errno); in expectBindConnectSendtoErrno()
586 assertEquals(expectedException.errno, EACCES); in test_NetlinkSocket()
726 expected.errno); in test_socketFamilies()
807 assertEquals(OsConstants.ENOENT, e.errno); in test_unlink()
828 if (OsConstants.ENOTCONN != expected.errno) { in test_recvfrom_concurrentShutdown()
[all …]
/libcore/luni/src/main/java/libcore/io/
DIoBridge.java77 if (errnoException.errno == ENOTTY) { in available()
106 if (errnoException.errno == EADDRINUSE || errnoException.errno == EADDRNOTAVAIL || in bind()
107 errnoException.errno == EPERM || errnoException.errno == EACCES) { in bind()
136 if (errnoException.errno == EHOSTUNREACH) { in connect()
139 if (errnoException.errno == EADDRNOTAVAIL) { in connect()
177 if (errnoException.errno != EINPROGRESS) { in connectErrno()
282 if (cause.errno == ETIMEDOUT) { in isConnected()
515 if (errnoException.errno == EAGAIN) { in read()
576 if (errnoException.errno == ECONNREFUSED) { in maybeThrowAfterSendto()
580 if (errnoException.errno == EAGAIN) { in maybeThrowAfterSendto()
[all …]
/libcore/luni/src/test/native/
Dlibcore_java_io_FileTest.cpp39 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/
DInet6AddressImpl.java148 int errno = ((ErrnoException) gaiException.getCause()).errno; in lookupHostByName()
149 if (errno == EACCES || errno == EPERM) { in lookupHostByName()
235 && ((ErrnoException) cause).errno == ECONNREFUSED; in tcpEcho()

123