Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 2229) sorted by relevance

12345678910>>...90

/external/opencv3/3rdparty/libtiff/
Dtif_print.c38 _TIFFprintAsciiBounded(FILE* fd, const char* cp, int max_chars);
67 _TIFFPrintField(FILE* fd, const TIFFField *fip, in _TIFFPrintField() argument
72 fprintf(fd, " %s: ", fip->field_name); in _TIFFPrintField()
76 fprintf(fd, "%u", ((uint8 *) raw_data)[j]); in _TIFFPrintField()
78 fprintf(fd, "0x%x", in _TIFFPrintField()
81 fprintf(fd, "%d", ((int8 *) raw_data)[j]); in _TIFFPrintField()
83 fprintf(fd, "%u", ((uint16 *) raw_data)[j]); in _TIFFPrintField()
85 fprintf(fd, "%d", ((int16 *) raw_data)[j]); in _TIFFPrintField()
87 fprintf(fd, "%lu", in _TIFFPrintField()
90 fprintf(fd, "%ld", (long)((int32 *) raw_data)[j]); in _TIFFPrintField()
[all …]
Dtif_unix.c59 _tiffReadProc(thandle_t fd, void* buf, tmsize_t size) in _tiffReadProc() argument
67 return ((tmsize_t) read((int)(intptr_t) fd, buf, size_io)); in _tiffReadProc()
71 _tiffWriteProc(thandle_t fd, void* buf, tmsize_t size) in _tiffWriteProc() argument
79 return ((tmsize_t) write((int)(intptr_t) fd, buf, size_io)); in _tiffWriteProc()
83 _tiffSeekProc(thandle_t fd, uint64 off, int whence) in _tiffSeekProc() argument
91 return((uint64)lseek((int)(intptr_t)fd,off_io,whence)); in _tiffSeekProc()
95 _tiffCloseProc(thandle_t fd) in _tiffCloseProc() argument
97 return(close((int)(intptr_t)fd)); in _tiffCloseProc()
101 _tiffSizeProc(thandle_t fd) in _tiffSizeProc() argument
104 if (fstat((int)(intptr_t)fd,&sb)<0) in _tiffSizeProc()
[all …]
/external/pdfium/third_party/libtiff/
Dtif_print.c38 _TIFFprintAsciiBounded(FILE* fd, const char* cp, size_t max_chars);
69 _TIFFPrintField(FILE* fd, const TIFFField *fip, in _TIFFPrintField() argument
74 fprintf(fd, " %s: ", fip->field_name); in _TIFFPrintField()
78 fprintf(fd, "%u", ((uint8 *) raw_data)[j]); in _TIFFPrintField()
80 fprintf(fd, "0x%x", in _TIFFPrintField()
83 fprintf(fd, "%d", ((int8 *) raw_data)[j]); in _TIFFPrintField()
85 fprintf(fd, "%u", ((uint16 *) raw_data)[j]); in _TIFFPrintField()
87 fprintf(fd, "%d", ((int16 *) raw_data)[j]); in _TIFFPrintField()
89 fprintf(fd, "%lu", in _TIFFPrintField()
92 fprintf(fd, "%ld", (long)((int32 *) raw_data)[j]); in _TIFFPrintField()
[all …]
/external/e2fsprogs/tests/progs/
Drandom_exercise.c50 int fd; in get_random_fd() local
53 fd = ((int) random()) % MAXFDS; in get_random_fd()
54 if (fd > 2) in get_random_fd()
55 return fd; in get_random_fd()
59 unsigned int get_inode_num(int fd) in get_inode_num() argument
63 if (fstat(fd, &st) < 0) { in get_inode_num()
74 int fd; in create_random_file() local
83 fd = open(template, O_RDONLY, 0600); in create_random_file()
85 template, fd); in create_random_file()
88 fd = open(template, O_CREAT|O_RDWR, 0600); in create_random_file()
[all …]
/external/clang/test/Analysis/
Dunix-api.c15 int fd; in open_1() local
16 fd = open(path, O_RDONLY); // no-warning in open_1()
17 if (fd > -1) in open_1()
18 close(fd); in open_1()
22 int fd; in open_2() local
24fd = open(path, O_RDONLY, mode, NULL); // expected-warning{{Call to 'open' with more than three ar… in open_2()
25 if (fd > -1) in open_2()
26 close(fd); in open_2()
30 int fd; in open_3() local
31 fd = open(path, O_RDONLY, NULL); // expected-warning{{Third argument to 'open' is not an integer}} in open_3()
[all …]
/external/dhcpcd-6.8.2/
Dcontrol.c74 control_queue_free(struct fd_list *fd) in control_queue_free() argument
78 while ((fdp = TAILQ_FIRST(&fd->queue))) { in control_queue_free()
79 TAILQ_REMOVE(&fd->queue, fdp, next); in control_queue_free()
81 control_queue_purge(fd->ctx, fdp->data); in control_queue_free()
84 while ((fdp = TAILQ_FIRST(&fd->free_queue))) { in control_queue_free()
85 TAILQ_REMOVE(&fd->free_queue, fdp, next); in control_queue_free()
91 control_delete(struct fd_list *fd) in control_delete() argument
94 TAILQ_REMOVE(&fd->ctx->control_fds, fd, next); in control_delete()
95 eloop_event_delete(fd->ctx->eloop, fd->fd, 0); in control_delete()
96 close(fd->fd); in control_delete()
[all …]
/external/icu/icu4c/source/test/intltest/
Ddcfmapts.cpp614 FixedDecimal fd = df->getFixedDecimal(44, status); in TestFixedDecimal() local
616 ASSERT_EQUAL(44, fd.source); in TestFixedDecimal()
617 ASSERT_EQUAL(0, fd.visibleDecimalDigitCount); in TestFixedDecimal()
618 ASSERT_EQUAL(FALSE, fd.isNegative); in TestFixedDecimal()
620 fd = df->getFixedDecimal(-44, status); in TestFixedDecimal()
622 ASSERT_EQUAL(44, fd.source); in TestFixedDecimal()
623 ASSERT_EQUAL(0, fd.visibleDecimalDigitCount); in TestFixedDecimal()
624 ASSERT_EQUAL(TRUE, fd.isNegative); in TestFixedDecimal()
628 fd = df->getFixedDecimal(123.456, status); in TestFixedDecimal()
630 ASSERT_EQUAL(3, fd.visibleDecimalDigitCount); // v in TestFixedDecimal()
[all …]
/external/toybox/toys/pending/
Dopenvt.c45 int i, fd; local
48 fd = open(console_name[i], O_RDWR);
49 if (fd >= 0) {
51 if (!ioctl(fd, KDGKBTYPE, &arg)) return fd;
52 close(fd);
57 for (fd = 0; fd < 3; fd++) {
59 if (0 == ioctl(fd, KDGKBTYPE, &arg)) return fd;
65 int xvtnum(int fd) in xvtnum() argument
69 ret = ioctl(fd, VT_OPENQRY, (int *)&TT.vt_num); in xvtnum()
77 int fd, vt_fd, ret = 0; in openvt_main() local
[all …]
/external/libdrm/
Dxf86drm.h116 int fd; member
121 extern int drmIoctl(int fd, unsigned long request, void *arg);
123 extern drmHashEntry *drmGetEntry(int fd);
487 #define DRM_LIGHT_LOCK(fd,lock,context) \ argument
491 if (__ret) drmGetLock(fd,context,0); \
496 #define DRM_LIGHT_LOCK_COUNT(fd,lock,context,count) \ argument
500 if (__ret) drmGetLock(fd,context,0); \
504 #define DRM_LOCK(fd,lock,context,flags) \ argument
506 if (flags) drmGetLock(fd,context,flags); \
507 else DRM_LIGHT_LOCK(fd,lock,context); \
[all …]
Dxf86drm.c167 drmIoctl(int fd, unsigned long request, void *arg) in drmIoctl() argument
172 ret = ioctl(fd, request, arg); in drmIoctl()
177 static unsigned long drmGetKeyFromFd(int fd) in drmGetKeyFromFd() argument
182 fstat(fd, &st); in drmGetKeyFromFd()
186 drmHashEntry *drmGetEntry(int fd) in drmGetEntry() argument
188 unsigned long key = drmGetKeyFromFd(fd); in drmGetEntry()
197 entry->fd = fd; in drmGetEntry()
313 int fd; in drmOpenDevice() local
392 fd = open(buf, O_RDWR, 0); in drmOpenDevice()
394 fd, fd < 0 ? strerror(errno) : "OK"); in drmOpenDevice()
[all …]
/external/bison/lib/
Dpipe2.c40 pipe2 (int fd[2], int flags) in pipe2()
46 tmp[0] = fd[0]; in pipe2()
47 tmp[1] = fd[1]; in pipe2()
58 int result = pipe2 (fd, flags); in pipe2()
79 if (_pipe (fd, 4096, flags & ~O_NONBLOCK) < 0) in pipe2()
81 fd[0] = tmp[0]; in pipe2()
82 fd[1] = tmp[1]; in pipe2()
92 if (set_nonblocking_flag (fd[0], true) != 0 in pipe2()
93 || set_nonblocking_flag (fd[1], true) != 0) in pipe2()
107 if (pipe (fd) < 0) in pipe2()
[all …]
Ddup2.c44 ms_windows_dup2 (int fd, int desired_fd) in ms_windows_dup2() argument
51 if (fd == desired_fd) in ms_windows_dup2()
53 if ((HANDLE) _get_osfhandle (fd) == INVALID_HANDLE_VALUE) in ms_windows_dup2()
58 return fd; in ms_windows_dup2()
71 result = dup2 (fd, desired_fd); in ms_windows_dup2()
91 rpl_dup2 (int fd, int desired_fd) in rpl_dup2() argument
99 if (fd == desired_fd) in rpl_dup2()
100 return fcntl (fd, F_GETFL) == -1 ? -1 : fd; in rpl_dup2()
103 result = dup2 (fd, desired_fd); in rpl_dup2()
109 if (fd != desired_fd && result != -1) in rpl_dup2()
[all …]
/external/compiler-rt/lib/tsan/rtl/
Dtsan_fd.cc45 static bool bogusfd(int fd) { in bogusfd() argument
47 return fd < 0 || fd >= kTableSize; in bogusfd()
74 static FdDesc *fddesc(ThreadState *thr, uptr pc, int fd) { in fddesc() argument
75 CHECK_GE(fd, 0); in fddesc()
76 CHECK_LT(fd, kTableSize); in fddesc()
77 atomic_uintptr_t *pl1 = &fdctx.tab[fd / kTableSizeL2]; in fddesc()
90 return &((FdDesc*)l1)[fd % kTableSizeL2]; // NOLINT in fddesc()
94 static void init(ThreadState *thr, uptr pc, int fd, FdSync *s, in init() argument
96 FdDesc *d = fddesc(thr, pc, fd); in init()
143 bool FdLocation(uptr addr, int *fd, int *tid, u32 *stack) { in FdLocation() argument
[all …]
/external/skia/platform_tools/android/third_party/ashmem/cutils/
Dashmem-dev.c44 int fd, ret; in ashmem_create_region() local
46 fd = open(ASHMEM_DEVICE, O_RDWR); in ashmem_create_region()
47 if (fd < 0) in ashmem_create_region()
48 return fd; in ashmem_create_region()
54 ret = ioctl(fd, ASHMEM_SET_NAME, buf); in ashmem_create_region()
59 ret = ioctl(fd, ASHMEM_SET_SIZE, size); in ashmem_create_region()
63 return fd; in ashmem_create_region()
66 close(fd); in ashmem_create_region()
70 int ashmem_set_prot_region(int fd, int prot) in ashmem_set_prot_region() argument
72 return ioctl(fd, ASHMEM_SET_PROT_MASK, prot); in ashmem_set_prot_region()
[all …]
/external/avahi/avahi-core/
Dsocket.c107 int avahi_mdns_mcast_join_ipv4(int fd, const AvahiIPv4Address *a, int idx, int join) { in avahi_mdns_mcast_join_ipv4() argument
115 assert(fd >= 0); in avahi_mdns_mcast_join_ipv4()
133 setsockopt(fd, IPPROTO_IP, IP_DROP_MEMBERSHIP, &mreq, sizeof(mreq)); in avahi_mdns_mcast_join_ipv4()
135 …if (setsockopt(fd, IPPROTO_IP, join ? IP_ADD_MEMBERSHIP : IP_DROP_MEMBERSHIP, &mreq, sizeof(mreq))… in avahi_mdns_mcast_join_ipv4()
143 int avahi_mdns_mcast_join_ipv6(int fd, const AvahiIPv6Address *a, int idx, int join) { in avahi_mdns_mcast_join_ipv6() argument
147 assert(fd >= 0); in avahi_mdns_mcast_join_ipv6()
157 setsockopt(fd, IPPROTO_IPV6, IPV6_DROP_MEMBERSHIP, &mreq6, sizeof(mreq6)); in avahi_mdns_mcast_join_ipv6()
159 …if (setsockopt(fd, IPPROTO_IPV6, join ? IPV6_ADD_MEMBERSHIP : IPV6_DROP_MEMBERSHIP, &mreq6, sizeof… in avahi_mdns_mcast_join_ipv6()
167 static int reuseaddr(int fd) { in reuseaddr() argument
171 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)) < 0) { in reuseaddr()
[all …]
/external/libdrm/tests/
Dupdatedraw.c32 set_draw_cliprects_empty(int fd, int drawable) in set_draw_cliprects_empty() argument
42 ret = ioctl(fd, DRM_IOCTL_UPDATE_DRAW, &update); in set_draw_cliprects_empty()
47 set_draw_cliprects_empty_fail(int fd, int drawable) in set_draw_cliprects_empty_fail() argument
57 ret = ioctl(fd, DRM_IOCTL_UPDATE_DRAW, &update); in set_draw_cliprects_empty_fail()
62 set_draw_cliprects_2(int fd, int drawable) in set_draw_cliprects_2() argument
83 ret = ioctl(fd, DRM_IOCTL_UPDATE_DRAW, &update); in set_draw_cliprects_2()
87 static int add_drawable(int fd) in add_drawable() argument
96 ret = ioctl(fd, DRM_IOCTL_ADD_DRAW, &drawarg); in add_drawable()
101 static int rm_drawable(int fd, int drawable, int fail) in rm_drawable() argument
110 ret = ioctl(fd, DRM_IOCTL_RM_DRAW, &drawarg); in rm_drawable()
[all …]
Ddrmtest.c38 static int is_master(int fd) in is_master() argument
45 ret = ioctl(fd, DRM_IOCTL_GET_CLIENT, &client); in is_master()
50 ret = ioctl(fd, DRM_IOCTL_GET_CLIENT, &client); in is_master()
66 int fd; in drm_open_matching() local
74 fd = -1; in drm_open_matching()
92 fd = open(dnode, O_RDWR); in drm_open_matching()
93 if (fd < 0) in drm_open_matching()
95 if ((flags & DRM_TEST_MASTER) && !is_master(fd)) { in drm_open_matching()
96 close(fd); in drm_open_matching()
97 fd = -1; in drm_open_matching()
[all …]
/external/boringssl/src/crypto/rand/
Durandom.c71 int fd = urandom_fd_requested; in init_once() local
74 if (fd == -2) { in init_once()
76 fd = open("/dev/urandom", O_RDONLY); in init_once()
77 } while (fd == -1 && errno == EINTR); in init_once()
80 if (fd < 0) { in init_once()
84 int flags = fcntl(fd, F_GETFD); in init_once()
92 if (fcntl(fd, F_SETFD, flags) == -1) { in init_once()
96 urandom_fd = fd; in init_once()
101 void RAND_set_urandom_fd(int fd) { in RAND_set_urandom_fd() argument
102 fd = dup(fd); in RAND_set_urandom_fd()
[all …]
/external/selinux/policycoreutils/sepolicy/sepolicy/
Dmanpage.py173 fd = open(html_manpage, 'w')
174 fd.write(output)
175 fd.close()
219 fd = open(index, 'w')
220 fd.write("""
240 fd.write("""
243 fd.write("""
254 fd.write("""
257 fd.write("""
260 fd.close()
[all …]
/external/libchrome/sandbox/linux/syscall_broker/
Dbroker_process_unittest.cc75 int fd = open_broker.Open(NULL, O_RDONLY); in TEST() local
76 ASSERT_EQ(fd, -EFAULT); in TEST()
101 int fd = -1; in TestOpenFilePerms() local
102 fd = open_broker.Open(kR_WhiteListed, O_RDONLY); in TestOpenFilePerms()
103 ASSERT_EQ(fd, -ENOENT); in TestOpenFilePerms()
104 fd = open_broker.Open(kR_WhiteListed, O_WRONLY); in TestOpenFilePerms()
105 ASSERT_EQ(fd, -denied_errno); in TestOpenFilePerms()
106 fd = open_broker.Open(kR_WhiteListed, O_RDWR); in TestOpenFilePerms()
107 ASSERT_EQ(fd, -denied_errno); in TestOpenFilePerms()
126 fd = open_broker.Open(kR_WhiteListedButDenied, O_RDONLY); in TestOpenFilePerms()
[all …]
/external/selinux/libselinux/src/
Dsetrans_client.c51 int fd; in setransd_open() local
53 fd = socket(PF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0); in setransd_open()
54 if (fd < 0 && errno == EINVAL) in setransd_open()
57 fd = socket(PF_UNIX, SOCK_STREAM, 0); in setransd_open()
58 if (fd >= 0) in setransd_open()
59 if (fcntl(fd, F_SETFD, FD_CLOEXEC)) { in setransd_open()
60 close(fd); in setransd_open()
64 if (fd < 0) in setransd_open()
70 if (connect(fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) { in setransd_open()
71 close(fd); in setransd_open()
[all …]
/external/zlib/src/examples/
Dgzlog.c291 int fd; /* file descriptor for .gz file, opened read/write */ member
350 int fd; in log_lock() local
354 while ((fd = open(log->path, O_CREAT | O_EXCL, 0644)) < 0) { in log_lock()
363 close(fd); in log_lock()
415 if (lseek(log->fd, 0, SEEK_SET) < 0 || in log_head()
416 read(log->fd, buf, HEAD + EXTRA) != HEAD + EXTRA || in log_head()
450 fsync(log->fd); in log_mark()
451 ret = lseek(log->fd, HEAD, SEEK_SET) < 0 || in log_mark()
452 write(log->fd, ext, EXTRA) != EXTRA ? -1 : 0; in log_mark()
453 fsync(log->fd); in log_mark()
[all …]
/external/dbus/dbus/
Ddbus-socket-set-epoll.c139 int fd, in socket_set_epoll_add() argument
147 event.data.fd = fd; in socket_set_epoll_add()
160 if (epoll_ctl (self->epfd, EPOLL_CTL_ADD, fd, &event) == 0) in socket_set_epoll_add()
174 _dbus_warn ("Bad fd %d\n", fd); in socket_set_epoll_add()
178 _dbus_warn ("fd %d added and then added again\n", fd); in socket_set_epoll_add()
182 _dbus_warn ("Misc error when trying to watch fd %d: %s\n", fd, in socket_set_epoll_add()
192 int fd, in socket_set_epoll_enable() argument
199 event.data.fd = fd; in socket_set_epoll_enable()
202 if (epoll_ctl (self->epfd, EPOLL_CTL_MOD, fd, &event) == 0) in socket_set_epoll_enable()
212 _dbus_warn ("Bad fd %d\n", fd); in socket_set_epoll_enable()
[all …]
Ddbus-file-unix.c59 int fd; in _dbus_file_get_contents() local
70 fd = open (filename_c, O_RDONLY | O_BINARY); in _dbus_file_get_contents()
71 if (fd < 0) in _dbus_file_get_contents()
80 _dbus_verbose ("file fd %d opened\n", fd); in _dbus_file_get_contents()
82 if (fstat (fd, &sb) < 0) in _dbus_file_get_contents()
92 _dbus_close (fd, NULL); in _dbus_file_get_contents()
102 _dbus_close (fd, NULL); in _dbus_file_get_contents()
114 bytes_read = _dbus_read (fd, str, in _dbus_file_get_contents()
126 _dbus_close (fd, NULL); in _dbus_file_get_contents()
134 _dbus_close (fd, NULL); in _dbus_file_get_contents()
[all …]
/external/google-breakpad/src/client/windows/sender/
Dcrash_report_sender.cc53 FILE *fd; in CrashReportSender() local
54 if (OpenCheckpointFile(L"r", &fd) == 0) { in CrashReportSender()
55 ReadCheckpoint(fd); in CrashReportSender()
56 fclose(fd); in CrashReportSender()
85 void CrashReportSender::ReadCheckpoint(FILE *fd) { in ReadCheckpoint() argument
87 if (!fgets(buf, sizeof(buf), fd) || in ReadCheckpoint()
92 if (fscanf_s(fd, "%d\n", &last_sent_date_) != 1) { in ReadCheckpoint()
96 if (fscanf_s(fd, "%d\n", &reports_sent_) != 1) { in ReadCheckpoint()
111 FILE *fd; in ReportSent() local
112 if (OpenCheckpointFile(L"w", &fd) == 0) { in ReportSent()
[all …]

12345678910>>...90