/bionic/libc/bionic/ |
H A D | arc4random.c | 104 int i, fd; local 116 fd = open("/dev/urandom", O_RDONLY); 117 if (fd != -1) { 118 read(fd, rdat.rnd, sizeof(rdat.rnd)); 119 close(fd); 123 /* fd < 0 ? Ah, what the heck. We'll just take
|
H A D | 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)
|
H A D | daemon.c | 41 int fd = open("/dev/null", O_RDWR); local 43 if ( fd < 0 ) 46 if ( dup2( fd, 0 ) < 0 || 47 dup2( fd, 1 ) < 0 || 48 dup2( fd, 2 ) < 0 ) 50 close(fd); 53 close(fd);
|
H A D | dirent.cpp | 48 static DIR* __allocate_DIR(int fd) { argument 53 d->fd_ = fd; 64 DIR* fdopendir(int fd) { argument 65 // Is 'fd' actually a directory? 67 if (fstat(fd, &sb) == -1) { 75 return __allocate_DIR(fd); 79 int fd = open(path, O_RDONLY | O_DIRECTORY); local 80 return (fd != -1) ? __allocate_DIR(fd) : NULL; 135 int fd local [all...] |
H A D | eventfd_read.cpp | 32 int eventfd_read(int fd, eventfd_t* value) { argument 33 return (read(fd, value, sizeof(*value)) == sizeof(*value)) ? 0 : -1;
|
H A D | eventfd_write.cpp | 32 int eventfd_write(int fd, eventfd_t value) { argument 33 return (write(fd, &value, sizeof(value)) == sizeof(value)) ? 0 : -1;
|
H A D | fcntl.c | 33 int fcntl(int fd, int cmd, ...) argument 42 return __fcntl64(fd, cmd, arg);
|
H A D | fdprintf.c | 34 int vfdprintf(int fd, const char * __restrict format, __va_list ap) argument 42 ret = write(fd, buf, ret); 48 int fdprintf(int fd, const char * __restrict format, ...) argument 54 ret = vfdprintf(fd, format, ap);
|
H A D | fstatfs.c | 32 int fstatfs(int fd, struct statfs* stat) argument 34 return __fstatfs64(fd, sizeof(struct statfs), stat);
|
H A D | fts.c | 62 #define FCHDIR(sp, fd) (!ISSET(FTS_NOCHDIR) && fchdir(fd)) 222 /* Stash the original directory fd if needed. */ 464 int fd; local 517 if ((fd = open(".", O_RDONLY, 0)) < 0) 520 if (fchdir(fd)) { 521 (void)close(fd); 524 (void)close(fd); 764 * the saved fd; if one of fts_open()'s arguments is a relative path 1010 * Change to dir specified by fd o 1015 fts_safe_changedir(FTS *sp, FTSENT *p, int fd, char *path) argument [all...] |
H A D | futimens.cpp | 32 int futimens(int fd, const struct timespec times[2]) { argument 33 return utimensat(fd, NULL, times, 0);
|
H A D | ioctl.c | 32 int ioctl(int fd, int request, ...) argument 41 return __ioctl(fd, request, arg);
|
H A D | isatty.c | 34 isatty (int fd) argument 38 return tcgetattr (fd, &term) == 0;
|
H A D | libc_logging.cpp | 99 FdOutputStream(int fd) : total(0), fd_(fd) { argument 413 int __libc_format_fd(int fd, const char* format, ...) { argument 414 FdOutputStream os(fd);
|
H A D | lseek64.c | 30 extern int __llseek(int fd, unsigned long offset_hi, unsigned long offset_lo, loff_t* result, int whence); 32 off64_t lseek64(int fd, off64_t off, int whence) argument 36 if ( __llseek(fd, (unsigned long)(off >> 32),(unsigned long)(off), &result, whence ) < 0 )
|
H A D | malloc_debug_qemu.cpp | 599 int fd = open("/dev/qemu_trace", O_RDWR); local 600 if (fd < 0) { 604 qtrace = mmap(NULL, PAGESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); 605 close(fd);
|
H A D | mmap.cpp | 40 void* mmap(void* addr, size_t size, int prot, int flags, int fd, off_t offset) { argument 47 void* result = __mmap2(addr, size, prot, flags, fd, unsigned_offset >> MMAP2_SHIFT);
|
H A D | openat.c | 36 int openat(int fd, const char *pathname, int flags, ...) argument 51 return __openat(fd, pathname, flags, mode); 54 int __openat_2(int fd, const char *pathname, int flags) argument 62 return __openat(fd, pathname, flags, 0);
|
H A D | pread.c | 31 ssize_t pread(int fd, void *buf, size_t nbytes, off_t offset) argument 33 return pread64(fd, buf, nbytes, (off64_t)offset);
|
H A D | pthread_setname_np.cpp | 74 int fd = open(comm_name, O_WRONLY); local 75 if (fd == -1) { 78 ssize_t n = TEMP_FAILURE_RETRY(write(fd, thread_name, thread_name_len)); 79 close(fd);
|
H A D | ptsname.c | 34 char* ptsname( int fd ) 39 if ( ioctl( fd, TIOCGPTN, &pty_num ) != 0 )
|
H A D | ptsname_r.c | 35 int ptsname_r( int fd, char* buf, size_t buflen) argument 46 if ( ioctl( fd, TIOCGPTN, &pty_num ) != 0 ) {
|
H A D | pwrite.c | 31 ssize_t pwrite(int fd, const void *buf, size_t nbytes, off_t offset) argument 33 return pwrite64(fd, buf, nbytes, (off64_t)offset);
|
H A D | signalfd.cpp | 33 extern "C" int signalfd4(int fd, kernel_sigset_t* mask, size_t sizemask, int flags); 35 int signalfd(int fd, const sigset_t* mask, int flags) { argument 37 return signalfd4(fd, &in_set, sizeof(in_set), flags);
|
H A D | statvfs.cpp | 54 int fstatvfs(int fd, struct statvfs* result) { argument 56 int rc = __fstatfs64(fd, sizeof(tmp), &tmp);
|