Home
last modified time | relevance | path

Searched refs:ifd (Results 1 – 25 of 60) sorted by relevance

123

/openbsd/usr.bin/netstat/
H A Dif.c99 struct if_data *ifd; in intpr() local
134 ifd = &ifm.ifm_data; in intpr()
158 total = ifd->ifi_ibytes + ifd->ifi_obytes + in intpr()
163 ifd->ifi_iqdrops); in intpr()
291 ifd->ifi_ibytes, ifd->ifi_obytes); in print_addr()
294 ifd->ifi_ipackets, in print_addr()
295 if_errs->count(ifd->ifi_ierrors, ifd->ifi_iqdrops), in print_addr()
296 ifd->ifi_opackets, in print_addr()
297 if_errs->count(ifd->ifi_oerrors, ifd->ifi_oqdrops), in print_addr()
512 struct if_data *ifd; in fetchifs() local
[all …]
H A Droute.c361 struct if_data *ifd; in rdomainpr() local
376 ifd = ifa->ifa_data; in rdomainpr()
377 if (rdom_if[ifd->ifi_rdomain] == NULL) { in rdomainpr()
378 if (asprintf(&rdom_if[ifd->ifi_rdomain], "%s", in rdomainpr()
382 old = rdom_if[ifd->ifi_rdomain]; in rdomainpr()
383 if (asprintf(&rdom_if[ifd->ifi_rdomain], "%s %s", in rdomainpr()
/openbsd/usr.sbin/mkuboot/
H A Dcopy_elf.c60 nbytes = read(ifd, &ehdr, sizeof ehdr); in ELFNAME()
73 if (read(ifd, shp, sz) != sz) in ELFNAME()
84 if (lseek(ifd, elfoff2h(ehdr.e_phoff) + i * in ELFNAME()
87 if (read(ifd, &phdr, sizeof phdr) != sizeof(phdr)) in ELFNAME()
133 if (lseek(ifd, elfoff2h(ehdr.e_phoff) + i * in ELFNAME()
191 if (lseek(ifd, elfoff2h(phdr.p_offset), in ELFNAME()
194 crc = copy_data(ifd, iname, ofd, oname, crc, in ELFNAME()
200 if (lseek(ifd, elfoff2h(phdr.p_offset) + in ELFNAME()
204 crc = copy_data(ifd, iname, ofd, oname, crc, in ELFNAME()
209 if (lseek(ifd, elfoff2h(phdr.p_offset), in ELFNAME()
[all …]
H A Dmkuboot.c150 int ifd, ofd; in main() local
226 ifd = open(iname, O_RDONLY); in main()
227 if (ifd == -1) in main()
229 if (fstat(ifd, &sb) == -1) in main()
258 if (is_elf(ifd, iname)) in main()
259 crc = copy_elf(ifd, iname, ofd, oname, crc, &ih); in main()
261 crc = copy_raw(ifd, iname, ofd, oname, crc, &ih); in main()
284 is_elf(int ifd, const char *iname) in is_elf() argument
289 nbytes = read(ifd, &ehdr, sizeof ehdr); in is_elf()
292 if (lseek(ifd, 0, SEEK_SET) != 0) in is_elf()
[all …]
/openbsd/usr.bin/split/
H A Dsplit.c52 int ifd = -1, ofd = -1; /* Input/output file descriptors. */ variable
95 if (ifd != -1) in main()
97 ifd = 0; in main()
136 if (ifd == -1) { /* Input file. */ in main()
137 if ((ifd = open(*argv, O_RDONLY)) < 0) in main()
156 if (ifd == -1) /* Stdin by default. */ in main()
157 ifd = 0; in main()
180 switch ((len = read(ifd, bfr, sizeof(bfr)))) { in split1()
226 if ((infp = fdopen(ifd, "r")) == NULL) in split2()
/openbsd/usr.bin/midicat/
H A Dmidicat.c34 int ifd, ofd; in main() local
40 ifd = ofd = -1; in main()
91 ifd = STDIN_FILENO; in main()
93 ifd = open(ifile, O_RDONLY); in main()
94 if (ifd == -1) in main()
136 len = read(ifd, buf, sizeof(buf)); in main()
178 close(ifd); in main()
/openbsd/usr.bin/mandoc/
H A Ddbm_map.c41 static int ifd; variable
55 if ((ifd = open(fname, O_RDONLY)) == -1) in dbm_map()
57 if (fstat(ifd, &st) == -1) in dbm_map()
69 ifd, 0)) == MAP_FAILED) in dbm_map()
112 close(ifd); in dbm_map()
122 if (close(ifd) == -1) in dbm_unmap()
/openbsd/lib/libutil/
H A Dimsg.c64 struct imsg_fd *ifd; in imsg_read() local
84 free(ifd); in imsg_read()
112 if (ifd != NULL) { in imsg_read()
113 ifd->fd = fd; in imsg_read()
114 TAILQ_INSERT_TAIL(&imsgbuf->fds, ifd, in imsg_read()
116 ifd = NULL; in imsg_read()
125 free(ifd); in imsg_read()
419 struct imsg_fd *ifd; in imsg_dequeue_fd() local
424 fd = ifd->fd; in imsg_dequeue_fd()
425 TAILQ_REMOVE(&imsgbuf->fds, ifd, entry); in imsg_dequeue_fd()
[all …]
/openbsd/gnu/usr.bin/perl/dist/IO/
H A Dpoll.c47 fd_set rfd,wfd,efd,ifd; in poll() local
53 FD_ZERO(&ifd); in poll()
69 if(fd < 0 || FD_ISSET(fd, &ifd)) in poll()
99 FD_SET(fds[i].fd, &ifd); in poll()
117 if(FD_ISSET(fd, &ifd)) in poll()
/openbsd/usr.bin/compress/
H A Dmain.c562 int error, ifd, ofd, oreg; in docompress() local
568 ifd = open_input(in); in docompress()
569 if (ifd == -1) in docompress()
574 close(ifd); in docompress()
583 (void) close(ifd); in docompress()
598 (void) close(ifd); in docompress()
622 if (close(ifd)) { in docompress()
683 ifd = open_input(in); in dodecompress()
684 if (ifd == -1) in dodecompress()
690 close (ifd); in dodecompress()
[all …]
/openbsd/usr.sbin/lpd/
H A Dfrontend_lpr.c62 int ifd; /* input file for displayq/rmjob */ member
117 conn->ifd = -1; in lpr_conn()
258 conn->ifd = fd; in lpr_on_request()
327 else if (conn->ifd != -1) in lpr_io_dispatch()
631 if (conn->ifd != -1) in lpr_close()
632 close(conn->ifd); in lpr_close()
676 r = read(conn->ifd, buf, sizeof(buf)); in lpr_stream()
696 close(conn->ifd); in lpr_stream()
697 conn->ifd = -1; in lpr_stream()
716 if (!conn->ai_done || conn->ifd == -1) in lpr_forward()
/openbsd/sbin/savecore/
H A Dsavecore.c397 int bounds, ifd, nr, nw, ofd = -1; in save_core() local
458 if ((ifd = open(rawp, O_RDONLY)) == -1) { in save_core()
460 ifd = dumpfd; in save_core()
464 if (lseek(ifd, dumpoff, SEEK_SET) == -1) { in save_core()
481 nr = read(ifd, buf, MINIMUM(dumpsize, sizeof(buf))); in save_core()
500 (void)close(ifd); in save_core()
504 ifd = open(kernel ? kernel : _PATH_UNIX, O_RDONLY); in save_core()
505 if (ifd == -1) { in save_core()
526 while ((nr = read(ifd, buf, sizeof(buf))) > 0) { in save_core()
/openbsd/usr.bin/patch/
H A Dinp.c132 int ifd, statfailed; in plan_a() local
182 if ((ifd = open(filename, O_RDONLY)) == -1) in plan_a()
186 i_womp = mmap(NULL, i_size, PROT_READ, MAP_PRIVATE, ifd, 0); in plan_a()
190 close(ifd); in plan_a()
197 close(ifd); in plan_a()
/openbsd/usr.bin/mg/
H A Dfileio.c383 int ifd, ofd; in copy() local
389 if ((ifd = open(frname, O_RDONLY)) == -1) in copy()
391 if (fstat(ifd, &orig) == -1) { in copy()
394 close(ifd); in copy()
399 close(ifd); in copy()
402 while ((sr = read(ifd, buf, sizeof(buf))) > 0) { in copy()
413 close(ifd); in copy()
424 (void) close(ifd); in copy()
/openbsd/gnu/usr.bin/gcc/gcc/
H A Dmips-tdump.c862 int ifd;
1003 if (ifd == -1)
1007 (long)sym_ptr->iss, ifd);
1070 unsigned int ifd = u.rndx.rfd; local
1074 if (ifd == ST_RFDESCAPE)
1075 ifd = u2.isym;
1079 if (ifd == 0xffffffff
1087 fdp = &file_desc[ifd];
1095 which, name, ifd, index);
1518 e_symbols[i].ifd,
[all …]
/openbsd/usr.sbin/dvmrpd/
H A Dkroute.c227 if_change(u_short ifindex, int flags, struct if_data *ifd) in if_change() argument
239 kif->k.link_state = ifd->ifi_link_state; in if_change()
240 kif->k.if_type = ifd->ifi_type; in if_change()
241 kif->k.baudrate = ifd->ifi_baudrate; in if_change()
244 LINK_STATE_IS_UP(ifd->ifi_link_state)) == kif->k.nh_reachable) in if_change()
/openbsd/gnu/gcc/gcc/
H A Dmips-tdump.c864 int ifd, FDR *fdp) in print_symbol() argument
1004 if (ifd == -1) in print_symbol()
1008 (long)sym_ptr->iss, ifd); in print_symbol()
1063 unsigned int ifd = u.rndx.rfd; in emit_aggregate() local
1067 if (ifd == ST_RFDESCAPE) in emit_aggregate()
1068 ifd = u2.isym; in emit_aggregate()
1072 if (ifd == 0xffffffff in emit_aggregate()
1080 fdp = &file_desc[ifd]; in emit_aggregate()
1088 which, name, ifd, index); in emit_aggregate()
1507 e_symbols[i].ifd, in main()
[all …]
/openbsd/usr.bin/sdiff/
H A Dsdiff.c100 int ifd, ofd; in mktmpcpy() local
105 ifd = open(source_file, O_RDONLY); in mktmpcpy()
107 if (ifd != -1) { in mktmpcpy()
108 if (fstat(ifd, &sb) == -1) in mktmpcpy()
113 close(ifd); in mktmpcpy()
119 ifd = STDIN_FILENO; in mktmpcpy()
131 while ((rcount = read(ifd, buf, sizeof(buf))) != -1 && in mktmpcpy()
146 close(ifd); in mktmpcpy()
/openbsd/sys/dev/ofw/
H A Dofw_misc.c130 if_register(struct if_device *ifd) in if_register() argument
132 ifd->if_phandle = OF_getpropint(ifd->if_node, "phandle", 0); in if_register()
134 LIST_INSERT_HEAD(&if_devices, ifd, if_list); in if_register()
140 struct if_device *ifd; in if_bynode() local
142 LIST_FOREACH(ifd, &if_devices, if_list) { in if_bynode()
143 if (ifd->if_node == node) in if_bynode()
144 return (ifd->if_ifp); in if_bynode()
153 struct if_device *ifd; in if_byphandle() local
158 LIST_FOREACH(ifd, &if_devices, if_list) { in if_byphandle()
159 if (ifd->if_phandle == phandle) in if_byphandle()
[all …]
/openbsd/usr.sbin/ntpd/
H A Dserver.c38 struct if_data *ifd; in setup_listeners() local
55 ifd = ifap->ifa_data; in setup_listeners()
56 rdomain = ifd->ifi_rdomain; in setup_listeners()
/openbsd/usr.sbin/vmd/
H A Dvmd.c100 int ifd; in vmd_dispatch_control() local
261 ifd = imsg_get_fd(imsg); in vmd_dispatch_control()
266 close(ifd); in vmd_dispatch_control()
274 close(ifd); in vmd_dispatch_control()
280 imsg->hdr.peerid, ifd, &vid, sizeof(vid)); in vmd_dispatch_control()
285 ifd = imsg_get_fd(imsg); in vmd_dispatch_control()
286 if (ifd == -1) { in vmd_dispatch_control()
294 close(ifd); in vmd_dispatch_control()
301 close(ifd); in vmd_dispatch_control()
309 close(ifd); in vmd_dispatch_control()
[all …]
H A Dpriv.c97 int ifd; in priv_dispatch_parent() local
258 ifd = imsg_get_fd(imsg); in priv_dispatch_parent()
260 if (ioctl(ifd, SIOCGIFADDR, &varesult.var_addr) != 0) in priv_dispatch_parent()
266 close(ifd); in priv_dispatch_parent()
/openbsd/usr.bin/gencat/
H A Dgencat.c133 int ofd, ifd; in main() local
157 if ((ifd = open(*argv, O_RDONLY)) == -1) in main()
159 MCParse(ifd); in main()
160 close(ifd); in main()
/openbsd/usr.bin/cvs/
H A Dclient.c206 int ifd[2], ofd[2], argc; in cvs_client_connect_to_server() local
221 if (pipe(ifd) == -1) in cvs_client_connect_to_server()
230 if (dup2(ifd[0], STDIN_FILENO) == -1) in cvs_client_connect_to_server()
235 close(ifd[1]); in cvs_client_connect_to_server()
264 close(ifd[0]); in cvs_client_connect_to_server()
267 if ((current_cvsroot->cr_srvin = fdopen(ifd[1], "w")) == NULL) in cvs_client_connect_to_server()
/openbsd/bin/pax/
H A Dbuf_subs.c601 wr_rdfile(ARCHD *arcn, int ifd, off_t *left) in wr_rdfile() argument
618 if ((res = read(ifd, bufpt, cnt)) <= 0) in wr_rdfile()
632 else if (fstat(ifd, &sb) == -1) in wr_rdfile()

123