Searched defs:fd (Results 426 - 450 of 1450) sorted by relevance

<<11121314151617181920>>

/external/dhcpcd/
H A Dbpf.c54 int fd = -1; local
64 fd = open(_PATH_BPF, O_RDWR | O_NONBLOCK);
72 fd = open(device, O_RDWR | O_NONBLOCK);
73 } while (fd == -1 && errno == EBUSY);
77 if (fd == -1)
80 if (ioctl(fd, BIOCVERSION, &pv) == -1)
90 if (ioctl(fd, BIOCSETIF, &ifr) == -1)
94 if (ioctl(fd, BIOCGBLEN, &buf_len) == -1)
105 if (ioctl(fd, BIOCIMMEDIATE, &flags) == -1)
119 if (ioctl(fd, BIOCSET
143 int fd; local
165 int fd = -1; local
[all...]
H A Dcontrol.c45 static int fd = -1; variable
59 close(l->fd);
60 delete_event(l->fd);
81 bytes = read(l->fd, buffer, sizeof(buffer) - 1);
109 if ((f = accept(fd, (struct sockaddr *)&run, &len)) == -1)
112 l->fd = f;
116 add_event(l->fd, handle_control_data, l);
122 if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
138 if (bind(fd, (struct sockaddr *)&sun, len) == -1 ||
141 set_cloexec(fd)
[all...]
/external/e2fsprogs/contrib/
H A Dfallocate.c89 int fd; local
156 fd = open(fname, O_WRONLY|O_LARGEFILE);
157 if (fd < 0) {
163 error = ftruncate(fd, length);
165 error = syscall(SYS_fallocate, fd, falloc_mode, offset, length);
172 close(fd);
/external/e2fsprogs/e2fsck/
H A Discan.c76 int fd = open(device_name, O_RDONLY, 0); local
78 if (fd < 0) {
83 if ((retval = ext2fs_sync_device(fd, 1))) {
88 close(fd);
/external/e2fsprogs/lib/blkid/
H A Dgetsize.c30 #include <linux/fd.h>
61 static int valid_offset(int fd, blkid_loff_t offset) argument
65 if (blkid_llseek(fd, offset, 0) < 0)
67 if (read(fd, &ch, 1) < 1)
75 blkid_loff_t blkid_get_dev_size(int fd) argument
81 if (ioctl(fd, DKIOCGETBLOCKCOUNT, &size64) >= 0) {
101 ioctl(fd, BLKGETSIZE64, &size64) >= 0) {
114 if (ioctl(fd, BLKGETSIZE, &size) >= 0)
121 if (ioctl(fd, DIOCGMEDIASIZE, &size64) >= 0)
129 if (ioctl(fd, FDGETPR
196 int fd; local
[all...]
/external/e2fsprogs/lib/ss/
H A Dhelp.c43 int fd, child; local
79 for (fd = -1, idx = 0; info->info_dirs[idx] != (char *)NULL; idx++) {
91 fd = open(buffer, O_RDONLY);
93 if (fd >= 0)
96 if (fd < 0) {
108 (void) close(fd);
111 (void) dup2(fd, 0); /* put file on stdin */
114 (void) close(fd); /* what can we do if it fails? */
/external/e2fsprogs/misc/
H A Dfindsuper.c118 int fd; local
178 fd = open(device_name, O_RDONLY);
179 if (fd < 0) {
190 for (; lseek64(fd, sk, SEEK_SET) != -1 &&
191 read(fd, &ext2, 512) == 512; sk += skiprate) {
261 close(fd);
/external/e2fsprogs/tests/progs/
H A Drandom_exercise.c50 int fd; local
53 fd = ((int) random()) % MAXFDS;
54 if (fd > 2)
55 return fd;
59 unsigned int get_inode_num(int fd) argument
63 if (fstat(fd, &st) < 0) {
74 int fd; local
83 fd = open(template, O_RDONLY, 0600);
84 printf("Created temp directory %s, fd = %d\n",
85 template, fd);
101 truncate_file(int fd) argument
116 unlink_file(int fd) argument
130 close_file(int fd) argument
144 int i, fd; local
[all...]
/external/elfutils/0.153/libdwfl/
H A Dargp-std.c214 int fd = open64 (arg, O_RDONLY); local
215 if (fd < 0)
219 Dwfl_Error error = __libdw_open_file (&fd, &core, true, false);
232 close (fd);
H A Dimage-header.c81 __libdw_image_header (int fd, off64_t *start_offset, argument
90 ssize_t n = pread_retry (fd, header_buffer, H_READ_SIZE,
H A Dopen.c70 decompress (int fd __attribute__ ((unused)), Elf **elf)
84 error = __libdw_gunzip (fd, offset, mapped, mapped_size, &buffer, &size);
86 error = __libdw_bunzip2 (fd, offset, mapped, mapped_size, &buffer, &size);
88 error = __libdw_unlzma (fd, offset, mapped, mapped_size, &buffer, &size);
121 what_kind (int fd, Elf **elfp, Elf_Kind *kind, bool *close_fd) argument
131 error = decompress (fd, elfp);
/external/elfutils/0.153/libelf/
H A Dnlist.c83 int fd; local
95 fd = open (filename, O_RDONLY);
96 if (fd == -1)
109 elf = INTUSE(elf_begin) (fd, ELF_C_READ_MMAP, NULL);
234 (void) close (fd);
247 (void) close (fd);
/external/expat/tests/benchmark/
H A Dbenchmark.c29 FILE *fd; local
55 fd = fopen (argv[j + 1], "r");
56 if (!fd) {
70 fileSize = fread (XMLBuf, sizeof (char), fileAttr.st_size, fd);
71 fclose (fd);
/external/f2fs-tools/tools/
H A Dfibmap.c53 int fd; local
57 fd = open(devname, O_RDONLY);
58 if (fd < 0)
61 if (fstat(fd, &bdev_stat) < 0)
65 if (ioctl(fd, HDIO_GETGEO, &geom) < 0)
79 close(fd);
85 int fd; local
101 fd = open(filename, O_RDONLY|O_LARGEFILE);
102 if (fd < 0) {
108 fsync(fd);
[all...]
/external/iproute2/tc/
H A Dem_cmp.c28 static void cmp_print_usage(FILE *fd) argument
30 fprintf(fd,
144 static int cmp_print_eopt(FILE *fd, struct tcf_ematch_hdr *hdr, void *data, argument
155 fprintf(fd, "u8 ");
157 fprintf(fd, "u16 ");
159 fprintf(fd, "u32 ");
161 fprintf(fd, "at %d layer %d ", cmp->off, cmp->layer);
164 fprintf(fd, "mask 0x%x ", cmp->mask);
167 fprintf(fd, "trans ");
170 fprintf(fd, "e
[all...]
/external/ipsec-tools/src/racoon/
H A Disakmp_unity.c125 int fd; local
129 if ((fd = open(filename, O_RDONLY, 0)) == -1) {
135 if ((len = read(fd, buf, MAXMOTD)) == -1) {
138 close(fd);
141 close(fd);
/external/kernel-headers/original/uapi/linux/
H A Dif_pppol2tp.h25 __kernel_pid_t pid; /* pid that owns the fd.
27 int fd; /* FD of UDP socket to use */ member in struct:pppol2tp_addr
39 __kernel_pid_t pid; /* pid that owns the fd.
41 int fd; /* FD of UDP socket to use */ member in struct:pppol2tpin6_addr
53 __kernel_pid_t pid; /* pid that owns the fd.
55 int fd; /* FD of UDP or IP socket to use */ member in struct:pppol2tpv3_addr
64 __kernel_pid_t pid; /* pid that owns the fd.
66 int fd; /* FD of UDP or IP socket to use */ member in struct:pppol2tpv3in6_addr
/external/libcap-ng/libcap-ng-0.7/utils/
H A Dpscap.c72 int fd, len; local
89 fd = open(buf, O_RDONLY|O_CLOEXEC, 0);
90 if (fd < 0)
92 len = read(fd, buf, sizeof buf - 1);
93 close(fd);
149 len = read(fd, buf, sizeof buf - 1);
150 close(fd);
/external/libnl/lib/route/
H A Dpktloc.c86 FILE *fd; local
97 if (!(fd = fopen(path, "r")))
112 buf = pktloc__create_buffer(fd, YY_BUF_SIZE, scanner);
/external/libpcap/
H A Dfad-gifc.c143 register int fd; local
160 fd = socket(AF_INET, SOCK_DGRAM, 0);
161 if (fd < 0) {
180 (void)close(fd);
187 if (ioctl(fd, SIOCGIFCONF, (char *)&ifc) < 0
191 (void)close(fd);
250 if (ioctl(fd, SIOCGIFFLAGS, (char *)&ifrflags) < 0) {
271 if (ioctl(fd, SIOCGIFNETMASK, (char *)&ifrnetmask) < 0) {
301 if (ioctl(fd, SIOCGIFBRDADDR,
340 if (ioctl(fd, SIOCGIFDSTADD
[all...]
H A Dfad-glifc.c86 register int fd4, fd6, fd; local
176 fd = fd6;
178 fd = fd4;
216 if (ioctl(fd, SIOCGLIFFLAGS, (char *)&ifrflags) < 0) {
237 if (ioctl(fd, SIOCGLIFNETMASK, (char *)&ifrnetmask) < 0) {
264 if (ioctl(fd, SIOCGLIFBRDADDR,
299 if (ioctl(fd, SIOCGLIFDSTADDR,
/external/libselinux/src/
H A Dbooleans.c88 int fd, len; local
107 fd = open(fname, O_RDONLY);
108 if (fd < 0)
111 len = read(fd, *buf, STRBUF_SIZE);
112 close(fd);
163 int fd, ret, len; local
181 fd = open(fname, O_WRONLY);
182 if (fd < 0) {
193 ret = write(fd, buf, 2);
194 close(fd);
207 int fd, ret; local
[all...]
/external/linux-tools-perf/perf-3.12.0/tools/perf/tests/
H A Dattr.c14 * Besides 'struct perf_event_attr' values we also store 'fd' and
68 int fd, int group_fd, unsigned long flags)
74 attr->type, attr->config, fd);
83 attr->type, attr->config, fd) < 0) {
90 __WRITE_ASS(fd, "d", fd);
138 int fd, int group_fd, unsigned long flags)
142 if (store_event(attr, pid, cpu, fd, group_fd, flags))
67 store_event(struct perf_event_attr *attr, pid_t pid, int cpu, int fd, int group_fd, unsigned long flags) argument
137 test_attr__open(struct perf_event_attr *attr, pid_t pid, int cpu, int fd, int group_fd, unsigned long flags) argument
/external/linux-tools-perf/perf-3.12.0/tools/perf/util/
H A Drun-command.c5 static inline void close_pair(int fd[2]) argument
7 close(fd[0]);
8 close(fd[1]);
13 int fd = open("/dev/null", O_RDWR); local
14 dup2(fd, to);
15 close(fd);
H A Dstrbuf.c109 ssize_t strbuf_read(struct strbuf *sb, int fd, ssize_t hint) argument
118 cnt = read(fd, sb->buf + sb->len, sb->alloc - sb->len - 1);

Completed in 1296 milliseconds

<<11121314151617181920>>