/external/openssh/openbsd-compat/ |
daemon.c | 54 int fd; local 71 if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) { 72 (void)dup2(fd, STDIN_FILENO); 73 (void)dup2(fd, STDOUT_FILENO); 74 (void)dup2(fd, STDERR_FILENO); 75 if (fd > 2) 76 (void)close (fd);
|
/external/valgrind/main/memcheck/tests/ |
mmaptest.c | 9 int fd; local 12 fd = open("dir", O_RDONLY); 13 mmap(NULL, 4711, PROT_READ, MAP_PRIVATE, fd, 0);
|
erringfds.c | 10 int fd, n; local 12 fd = open("foo/bar/xyzzy", O_RDONLY); /* fails */ 13 printf("fd = %d\n", fd); 14 n = read ( fd, buf, 10 );
|
fwrite.c | 8 int fd = open("/dev/null", O_WRONLY); local 9 if (fd < 0) { 12 (void)write(fd, arr, 10); 13 (void)close(fd);
|
/bionic/libc/unistd/ |
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);
|
/external/chromium/base/test/ |
test_file_util_linux.cc | 16 int fd = open(file.value().c_str(), O_RDONLY); local 17 if (fd < 0) 19 if (fdatasync(fd) != 0) 21 if (posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED) != 0) 23 close(fd);
|
/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/elfutils/tests/ |
early-offscn.c | 46 int fd = open (argv[1], O_RDONLY); local 47 if (fd < 0) 50 Elf *elf = elf_begin (fd, ELF_C_READ, NULL);
|
rdwrmmap.c | 11 int fd = open (argv[1], O_RDWR); local 12 if (fd < 0) 18 Elf *elf = elf_begin (fd, ELF_C_RDWR_MMAP, NULL); 26 close (fd);
|
newscn.c | 41 int fd; local 46 fprintf (stderr, "library fd of date\n"); 51 fd = mkstemp (name); 52 if (fd < 0) 59 elf = elf_begin (fd, ELF_C_WRITE, NULL); 71 close (fd);
|
/external/libselinux/src/ |
check_context.c | 15 int fd, ret; local 23 fd = open(path, O_RDWR); 24 if (fd < 0) 27 ret = write(fd, con, strlen(con) + 1); 28 close(fd);
|
load_policy.c | 22 int fd, ret; local 30 fd = open(path, O_RDWR); 31 if (fd < 0) 34 ret = write(fd, data, len); 35 close(fd);
|
disable.c | 14 int fd, ret; local 24 fd = open(path, O_WRONLY); 25 if (fd < 0) 30 ret = write(fd, buf, strlen(buf)); 31 close(fd);
|
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);
|
/external/valgrind/main/coregrind/ |
pub_core_libcprint.h | 42 or not the fd is a socket. */ 44 struct { Int fd; Bool is_socket; } member in struct:__anon15352
|
/external/valgrind/main/none/tests/ |
closeall.c | 9 int fd; local 13 for ( fd = 3; fd < lim.rlim_cur; fd++ ) 14 close( fd );
|
rlimit_nofile.c | 13 int fd; local 62 if ((fd = open("/dev/null", O_RDONLY)) >= 0) 64 fprintf(stderr, "open succeeded with fd %d - it should have failed!\n", fd);
|
mmap_fcntl_bug.c | 21 int fd, status; local 26 fd = open(file, O_RDWR); 27 if (fd < 0) 36 if (fcntl(fd, F_SETLK, &fl) != 0) 40 if (mmap(NULL, getpagesize(), PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0) == MAP_FAILED) 46 if (fcntl(fd, F_SETLK, &fl) == 0)
|
/system/core/include/cutils/ |
abort_socket.h | 38 * asocket_create() sets the fd to non-blocking mode. It must not be changed to 59 int fd; /* primary socket fd */ member in struct:asocket 63 /* Create an asocket from fd. 67 struct asocket *asocket_init(int fd);
|
/system/core/libcutils/ |
load_file.c | 26 int fd; local 29 fd = open(fn, O_RDONLY); 30 if(fd < 0) return 0; 32 sz = lseek(fd, 0, SEEK_END); 35 if(lseek(fd, 0, SEEK_SET) != 0) goto oops; 40 if(read(fd, data, sz) != sz) goto oops; 41 close(fd); 48 close(fd);
|
/system/extras/tests/cpueater/ |
cpueater.c | 32 int fd; local 60 for (fd = 3; fd < 256; fd++) { 61 close(fd);
|
/external/dhcpcd/ |
control.h | 34 int fd; member in struct:fd_list
|
/external/e2fsprogs/e2fsck/ |
flushb.c | 40 int fd; local 46 fd = open(argv[1], O_RDONLY, 0); 47 if (fd < 0) { 56 if (ioctl(fd, BLKFLSBUF, 0) < 0) {
|
/external/linux-tools-perf/util/ |
cgroup.h | 8 int fd; member in struct:cgroup_sel
|
/frameworks/native/services/surfaceflinger/tests/waitforvsync/ |
waitforvsync.cpp | 32 int fd = open("/dev/graphics/fb0", O_RDWR); local 33 if (fd >= 0) { 36 int err = ioctl(fd, FBIO_WAITFORVSYNC, &crt); 42 close(fd);
|