/external/libselinux/src/ |
setenforce.c | 14 int fd, ret; local 24 fd = open(path, O_RDWR); 25 if (fd < 0) 29 ret = write(fd, buf, strlen(buf)); 30 close(fd);
|
/ndk/tests/device/clone/jni/ |
clone.c | 7 int v, fd; variable 12 close(fd); 24 fd = open(argv[0], O_RDONLY); 25 if (read(fd, &ch, 1) < 1) { 36 if (read(fd, &ch, 1) < 1) {
|
/system/extras/tests/cpueater/ |
cpueater.c | 32 int fd; local 60 for (fd = 3; fd < 256; fd++) { 61 close(fd);
|
/external/chromium_org/ui/events/ozone/ |
event_factory_ozone.cc | 36 int fd, 38 CHECK(watchers_.count(fd) == 0 && converters_.count(fd) == 0); 43 fd, 49 converters_[fd] = converter.release(); 50 watchers_[fd] = watcher; 53 void EventFactoryOzone::RemoveEventConverter(int fd) { 55 delete watchers_[fd]; 56 delete converters_[fd]; 57 watchers_.erase(fd); [all...] |
/external/openssh/openbsd-compat/ |
bsd-closefrom.c | 71 long fd, maxfd; local 78 /* Check for a /proc/$$/fd directory. */ 79 len = snprintf(fdpath, sizeof(fdpath), "/proc/%ld/fd", (long)getpid()); 82 fd = strtol(dent->d_name, &endp, 10); 84 fd >= 0 && fd < INT_MAX && fd >= lowfd && fd != dirfd(dirp)) 85 (void) close((int) fd); 94 * and then drop the rlimit such that it is below the open fd [all...] |
bsd-poll.c | 36 * Supports pfd.fd = -1 meaning "unused" although it's not standard. 43 int saved_errno, ret, fd, maxfd = 0; local 49 fd = fds[i].fd; 50 if (fd >= FD_SETSIZE) { 54 maxfd = MAX(maxfd, fd); 68 fd = fds[i].fd; 69 if (fd == -1) 72 FD_SET(fd, readfds) [all...] |
/bionic/libc/bionic/ |
cpuacct.c | 38 int fd; local 44 fd = open(buf, O_RDWR | O_CREAT, 0666); 45 if (fd == -1) { 53 fd = open(buf, O_RDWR | O_CREAT, 0666); 55 if (fd == -1) 58 n = TEMP_FAILURE_RETRY(write(fd, "0", 1)); 64 if (TEMP_FAILURE_RETRY(close(fd)) == -1)
|
/external/bison/lib/ |
fstat.c | 35 orig_fstat (int fd, struct stat *buf) 37 return fstat (fd, buf); 55 fstat_nothrow (int fd, struct stat *buf) 61 result = orig_fstat (fd, buf); 77 rpl_fstat (int fd, struct stat *buf) 82 const char *name = _gl_directory_name (fd); 87 return fstat_nothrow (fd, buf);
|
open.c | 56 int fd; local 118 fd = orig_open (filename, flags, mode); 127 if (REPLACE_OPEN_DIRECTORY && fd < 0 && errno == EACCES 135 fd = open ("/dev/null", flags, mode); 136 if (0 <= fd) 137 fd = _gl_register_fd (fd, filename); 145 /* If the filename ends in a slash and fd does not refer to a directory, 157 if (fd >= 0) 165 if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode) [all...] |
/external/elfutils/lib/ |
system.h | 64 extern int crc32_file (int fd, uint32_t *resp); 74 #define pwrite_retry(fd, buf, len, off) \ 75 TEMP_FAILURE_RETRY (pwrite (fd, buf, len, off)) 76 #define write_retry(fd, buf, n) \ 77 TEMP_FAILURE_RETRY (write (fd, buf, n)) 78 #define pread_retry(fd, buf, len, off) \ 79 TEMP_FAILURE_RETRY (pread (fd, buf, len, off))
|
/external/elfutils/libdwfl/ |
dwfl_build_id_find_debuginfo.c | 64 int fd = -1; local 68 fd = __libdwfl_open_by_build_id (mod, true, debuginfo_file_name); 69 if (fd >= 0) 74 mod->debug.elf = elf_begin (fd, ELF_C_READ_MMAP_PRIVATE, NULL); 83 close (fd); 84 fd = -1; 90 return fd;
|
/external/qemu/ |
iolooper.h | 14 void iolooper_add_read( IoLooper* iol, int fd ); 15 void iolooper_add_write( IoLooper* iol, int fd ); 16 void iolooper_del_read( IoLooper* iol, int fd ); 17 void iolooper_del_write( IoLooper* iol, int fd ); 23 void iolooper_modify( IoLooper* iol, int fd, int oldflags, int newflags); 33 int iolooper_is_read( IoLooper* iol, int fd ); 34 int iolooper_is_write( IoLooper* iol, int fd );
|
/sdk/emulator/opengl/tests/event_injector/ |
iolooper.h | 33 void iolooper_add_read( IoLooper* iol, int fd ); 34 void iolooper_add_write( IoLooper* iol, int fd ); 35 void iolooper_del_read( IoLooper* iol, int fd ); 36 void iolooper_del_write( IoLooper* iol, int fd ); 42 void iolooper_modify( IoLooper* iol, int fd, int oldflags, int newflags); 52 int iolooper_is_read( IoLooper* iol, int fd ); 53 int iolooper_is_write( IoLooper* iol, int fd );
|
/development/ndk/sources/android/libportable/arch-mips/ |
filefd.c | 112 int fd; local 134 for (fd = 0; fd < __FD_SETSIZE; fd++) { 135 fd_type = filefd_mapped_file[fd]; 138 ALOGV("%s: fd_type = %d = filefd_mapped_file[fd:%d]; ++fdcount:%d;", __func__, 139 fd_type, fd, fd_count); 141 fd_cloexec = filefd_FD_CLOEXEC_file[fd]; 142 ALOGV("%s: fd_cloexec = %d = filefd_FD_CLOEXEC_file[fd:%d];", __func__, 143 fd_cloexec, fd); 238 int fd; local [all...] |
/external/linux-tools-perf/scripts/perl/ |
rw-by-file.pl | 31 $common_pid, $common_comm, $nr, $fd, $buf, $count) = @_; 34 $reads{$fd}{bytes_requested} += $count; 35 $reads{$fd}{total_reads}++; 42 $common_pid, $common_comm, $nr, $fd, $buf, $count) = @_; 45 $writes{$fd}{bytes_written} += $count; 46 $writes{$fd}{total_writes}++; 54 printf("%6s %10s %10s\n", "fd", "# reads", "bytes_requested"); 57 foreach my $fd (sort {$reads{$b}{bytes_requested} <=> 59 my $total_reads = $reads{$fd}{total_reads}; 60 my $bytes_requested = $reads{$fd}{bytes_requested} [all...] |
/external/chromium_org/third_party/mesa/src/src/gallium/targets/egl-static/ |
egl_pipe.c | 50 pipe_i915_create_screen(int fd) 56 iws = i915_drm_winsys_create(fd); 73 pipe_nouveau_create_screen(int fd) 78 screen = nouveau_drm_screen_create(fd); 91 pipe_r300_create_screen(int fd) 97 sws = radeon_drm_winsys_create(fd); 114 pipe_r600_create_screen(int fd) 120 rw = radeon_drm_winsys_create(fd); 137 pipe_radeonsi_create_screen(int fd) 143 rw = radeon_drm_winsys_create(fd); [all...] |
/external/mesa3d/src/gallium/targets/egl-static/ |
egl_pipe.c | 50 pipe_i915_create_screen(int fd) 56 iws = i915_drm_winsys_create(fd); 73 pipe_nouveau_create_screen(int fd) 78 screen = nouveau_drm_screen_create(fd); 91 pipe_r300_create_screen(int fd) 97 sws = radeon_drm_winsys_create(fd); 114 pipe_r600_create_screen(int fd) 120 rw = radeon_drm_winsys_create(fd); 137 pipe_radeonsi_create_screen(int fd) 143 rw = radeon_drm_winsys_create(fd); [all...] |
/libcore/luni/src/main/java/libcore/io/ |
Posix.java | 32 public native FileDescriptor accept(FileDescriptor fd, InetSocketAddress peerAddress) throws ErrnoException, SocketException; 34 public native void bind(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException; 37 public native void close(FileDescriptor fd) throws ErrnoException; 38 public native void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException; 44 public native void fchmod(FileDescriptor fd, int mode) throws ErrnoException; 45 public native void fchown(FileDescriptor fd, int uid, int gid) throws ErrnoException; 46 public native int fcntlVoid(FileDescriptor fd, int cmd) throws ErrnoException; 47 public native int fcntlLong(FileDescriptor fd, int cmd, long arg) throws ErrnoException; 48 public native int fcntlFlock(FileDescriptor fd, int cmd, StructFlock arg) throws ErrnoException; 49 public native void fdatasync(FileDescriptor fd) throws ErrnoException [all...] |
ForwardingOs.java | 38 public FileDescriptor accept(FileDescriptor fd, InetSocketAddress peerAddress) throws ErrnoException, SocketException { return os.accept(fd, peerAddress); } 40 public void bind(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException { os.bind(fd, address, port); } 43 public void close(FileDescriptor fd) throws ErrnoException { os.close(fd); } 44 public void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException { os.connect(fd, address, port); } 50 public void fchmod(FileDescriptor fd, int mode) throws ErrnoException { os.fchmod(fd, mode); [all...] |
/hardware/invensense/60xx/libsensors_iio/ |
MPLSupport.cpp | 47 int count, fd; local 49 fd = open(fname, O_RDONLY); 50 if(fd < 0) { 55 count = read_attribute_sensor(fd, buf, sizeof(buf)); 57 close(fd); 64 close(fd); 70 int read_attribute_sensor(int fd, char* data, unsigned int size) 75 if (fd > 0) { 76 count = pread(fd, data, size, 0); 87 * @note this function one closes FD after the writ [all...] |
/external/llvm/autoconf/m4/ |
func_mmap_file.m4 | 14 int fd; 15 fd = creat ("foo",0777); 16 fd = (int) mmap (0, 1, PROT_READ, MAP_SHARED, fd, 0); 18 return (fd != (int) MAP_FAILED);]])],
|
/external/llvm/projects/sample/autoconf/m4/ |
func_mmap_file.m4 | 14 int fd; 15 fd = creat ("foo",0777); 16 fd = (int) mmap (0, 1, PROT_READ, MAP_SHARED, fd, 0); 18 return (fd != (int) MAP_FAILED);]])],
|
/frameworks/base/libs/androidfw/ |
ObbFile.cpp | 88 int fd; local 91 fd = ::open(filename, O_RDONLY); 92 if (fd < 0) { 96 success = readFrom(fd); 97 close(fd); 100 ALOGW("failed to read from %s (fd=%d)\n", filename, fd); 107 bool ObbFile::readFrom(int fd) 109 if (fd < 0) { 110 ALOGW("attempt to read from invalid fd\n") 228 int fd; local 313 int fd; local [all...] |
/hardware/ril/rild/ |
radiooptions.c | 81 int fd; local 89 fd = socket_local_client(SOCKET_NAME_RIL_DEBUG, 92 if (fd < 0) { 98 int ret = send(fd, (const void *)&num_socket_args, sizeof(int), 0); 101 close(fd); 108 ret = send(fd, &len, sizeof(int), 0); 111 close(fd); 114 ret = send(fd, argv[1 + i], sizeof(char) * len, 0); 117 close(fd); 122 close(fd); [all...] |
/external/chromium_org/mojo/common/test/ |
multiprocess_test_base_unittest.cc | 57 // Take ownership of the FD. 61 int fd = channel.fd; local 63 // The FD should be non-blocking. Check this. 64 CHECK((fcntl(fd, F_GETFL) & O_NONBLOCK)); 66 PCHECK(fcntl(fd, F_SETFL, 0) == 0); 70 ssize_t write_size = HANDLE_EINTR(write(fd, &c, 1)); 75 ssize_t read_size = HANDLE_EINTR(read(fd, &d, 1)); 87 // Take ownership of the FD. 91 int fd = channel.fd local [all...] |