/src/sys/arch/ews4800mips/stand/common/ |
inckern.c | 41 FILE *ifd, *ofd; local in function:main 47 ifd = stdin; 52 if ((optarg == 0) || (ifd != stdin)) 59 (ifd = fopen(optarg, "r")) == 0) 78 while ((n = fread(buf, 1, TMPBUF_SIZE, ifd)) > 0) { 94 if (ifd != stdin) 95 fclose(ifd);
|
/src/sys/arch/pmax/stand/smallnet/setnetimage/ |
setnetimage.c | 79 int ifd, ofd, i, nsegs; local in function:main 99 if ((ifd = open(kernel, O_RDONLY)) < 0) 130 i = read(ifd, (char *)&ehdr, sizeof(ehdr)); 140 if (lseek(ifd, (off_t) ehdr.e_phoff + i * sizeof(phdr), 0) < 0) 142 if (read(ifd, &phdr, sizeof(phdr)) != sizeof(phdr)) 174 printf("lseek(ifd, %d, 0)\n", seglist[i].f_offset); 176 if (lseek(ifd, (off_t)seglist[i].f_offset, 0) < 0) 179 printf("read(ifd, %p, %d)\n", \ 183 if (read(ifd, uncomp_kernel + seglist[i].addr - lowaddr, 187 close(ifd); [all...] |
/src/sys/rump/net/lib/libvirtif/ |
if_virt.c | 200 struct ifdrv *ifd; local in function:virtif_ioctl 208 ifd = data; 216 if (ifd->ifd_cmd == IFLINKSTR_QUERYLEN) { 217 ifd->ifd_len = linkstrlen; 221 if (ifd->ifd_cmd != 0) { 227 ifd->ifd_data, MIN(ifd->ifd_len,linkstrlen), NULL); 235 ifd = data; 237 if (ifd->ifd_cmd == IFLINKSTR_UNSET) { 239 } else if (ifd->ifd_cmd != 0) [all...] |
/src/usr.bin/split/ |
split.c | 60 static int ifd = STDIN_FILENO, ofd = -1; /* Input/output file descriptors. */ variable in typeref:typename:int 140 (ifd = open(*argv, O_RDONLY, 0)) < 0) 188 switch (len = read(ifd, bfr, MAXBSIZE)) { 255 switch (len = read(ifd, bfr, MAXBSIZE)) { 296 if (fstat(ifd, &sb) == -1) {
|
/src/sbin/canconfig/ |
canconfig.c | 429 struct ifdrv ifd; local in function:do_cmd2 432 memset(&ifd, 0, sizeof(ifd)); 434 strlcpy(ifd.ifd_name, canifname, sizeof(ifd.ifd_name)); 435 ifd.ifd_cmd = op; 436 ifd.ifd_len = argsize; 437 ifd.ifd_data = arg; 439 error = ioctl(sock, set ? SIOCSDRVSPEC : SIOCGDRVSPEC, &ifd); 442 *outsizep = ifd.ifd_len [all...] |
/src/sys/arch/amiga/stand/bootblock/elf2bb/ |
elf2bb.c | 94 int ifd, ofd; local in function:main 139 ifd = open(argv[0], O_RDONLY, 0); 140 if (ifd < 0) 143 image = mmap(0, 65536, PROT_READ, MAP_FILE|MAP_PRIVATE, ifd, 0);
|
/src/usr.bin/patch/ |
inp.c | 144 int ifd, statfailed, devnull, pstat; local in function:plan_a 292 if ((ifd = open(filename, O_RDONLY)) < 0) 296 i_womp = mmap(NULL, i_size, PROT_READ, MAP_PRIVATE, ifd, 0); 300 close(ifd); 307 close(ifd);
|
/src/sys/dev/usb/ |
usbdi_util.c | 455 usb_interface_descriptor_t *ifd = usbd_get_interface_descriptor(iface); local in function:usbd_set_idle 462 if (ifd == NULL) 468 USETW(req.wIndex, ifd->bInterfaceNumber); 527 usb_interface_descriptor_t *ifd = usbd_get_interface_descriptor(iface); local in function:usbd_set_report 534 if (ifd == NULL) 540 USETW(req.wIndex, ifd->bInterfaceNumber); 549 usb_interface_descriptor_t *ifd = usbd_get_interface_descriptor(iface); local in function:usbd_get_report 555 if (ifd == NULL) 561 USETW(req.wIndex, ifd->bInterfaceNumber);
|
/src/sys/arch/mips/adm5120/dev/ |
if_admsw.c | 738 struct ifdrv *ifd; local in function:admsw_ioctl 754 ifd = (struct ifdrv *) data; 755 if (ifd->ifd_cmd != 0 || ifd->ifd_len != sizeof(vlan_matrix)) { 760 error = copyout(vlan_matrix, ifd->ifd_data, 763 error = copyin(ifd->ifd_data, vlan_matrix,
|
/src/common/dist/zlib/test/ |
minigzip.c | 311 int ifd = fileno(in); local in function:gz_compress_mmap 317 if (fstat(ifd, &sb) < 0) return Z_ERRNO; 322 buf = mmap((caddr_t) 0, buf_len, PROT_READ, MAP_SHARED, ifd, (off_t)0);
|
/src/usr.bin/gencat/ |
gencat.c | 150 int ofd, ifd; local in function:main 203 if ((ifd = open(*argv, O_RDONLY)) < 0) 207 MCParse(ifd); 208 close(ifd);
|
/src/usr.bin/sdiff/ |
sdiff.c | 100 int ifd, ofd; local in function:mktmpcpy 105 ifd = open(source_file, O_RDONLY, 0); 107 if (ifd != -1) { 108 if (fstat(ifd, &sb) == -1) 117 ifd = STDIN_FILENO; 129 while ((rcount = read(ifd, buf, sizeof(buf))) != -1 && 144 close(ifd);
|
/src/usr.sbin/ifwatchd/ |
ifwatchd.c | 319 struct interface_data *ifd = NULL; local in function:check_addrs 333 if ((ifd = find_interface(li->sdl_index)) == NULL) { 346 if (ifa != NULL && ifd != NULL) { 350 invoke_script(ifd->ifname, ev, ifa, brd); 500 do_announce(struct interface_data *ifd, 506 ifd->index = index; 507 invoke_script(ifd->ifname, ARRIVAL, NULL, NULL); 510 ifd->index = -1; 511 ifd->last_carrier_status = -1; 512 invoke_script(ifd->ifname, DEPARTURE, NULL, NULL) 563 struct interface_data * ifd; local in function:run_initial_ups [all...] |
/src/sbin/brconfig/ |
brconfig.c | 513 struct ifdrv ifd; local in function:do_cmd2 516 memset(&ifd, 0, sizeof(ifd)); 518 strlcpy(ifd.ifd_name, bridge, sizeof(ifd.ifd_name)); 519 ifd.ifd_cmd = op; 520 ifd.ifd_len = argsize; 521 ifd.ifd_data = arg; 523 error = ioctl(sock, set ? SIOCSDRVSPEC : SIOCGDRVSPEC, &ifd); 526 *outsizep = ifd.ifd_len [all...] |
/src/sys/rump/net/lib/libshmif/ |
if_shmem.c | 485 struct ifdrv *ifd; local in function:shmif_ioctl 492 ifd = data; 499 ifd->ifd_len = sc->sc_backfilelen; 500 if (ifd->ifd_cmd == IFLINKSTR_QUERYLEN) { 505 if (ifd->ifd_cmd != 0) { 510 rv = copyoutstr(sc->sc_backfile, ifd->ifd_data, 511 MIN(sc->sc_backfilelen, ifd->ifd_len), NULL); 519 ifd = data; 520 if (ifd->ifd_cmd == IFLINKSTR_UNSET) { 526 } else if (ifd->ifd_cmd != 0) [all...] |
/src/usr.bin/netstat/ |
if.c | 205 struct if_data *ifd = NULL; local in function:intpr_sysctl 239 ifd = &ifm->ifm_data; 270 total = ifd->ifi_ibytes + ifd->ifi_obytes + 271 ifd->ifi_ipackets + ifd->ifi_ierrors + 272 ifd->ifi_opackets + ifd->ifi_oerrors + 273 ifd->ifi_collisions; 275 total += ifd->ifi_iqdrops 343 struct if_data ifd; local in function:intpr_kvm 843 struct if_data ifd; local in function:sidewaysintpr_kvm 1128 struct if_data *ifd = NULL; local in function:fetchifs [all...] |
/src/usr.sbin/wgconfig/ |
wgconfig.c | 209 struct ifdrv ifd; local in function:ioctl_get 221 strlcpy(ifd.ifd_name, interface, sizeof(ifd.ifd_name)); 222 ifd.ifd_cmd = 0; 223 ifd.ifd_data = buf; 224 ifd.ifd_len = PROP_BUFFER_LEN; 226 error = ioctl(sock, SIOCGDRVSPEC, &ifd); 394 struct ifdrv ifd; local in function:ioctl_set 397 strlcpy(ifd.ifd_name, interface, sizeof(ifd.ifd_name)) [all...] |
/src/usr.bin/xlint/xlint/ |
xlint.c | 525 int ifd, ofd; local in function:cat 536 if ((ifd = open(src, O_RDONLY)) == -1) { 541 if ((rlen = read(ifd, buf, sizeof(buf))) == -1) { 550 (void)close(ifd);
|
/src/sys/altq/ |
altq_rmclass.c | 82 #define reset_cutoff(ifd) { ifd->cutoff_ = RM_MAXDEPTH; } 141 * 'pri' on the interface given by 'ifd'. 198 rmc_newclass(int pri, struct rm_ifdat *ifd, uint64_t psecPerByte, 244 cl->ifdat_ = ifd; 315 if ((peer = ifd->active_[pri]) != NULL) { 318 while (peer->peer_ != ifd->active_[pri]) 322 ifd->active_[pri] = cl; 341 if (ifd->wrr_) { 342 ifd->num_[pri]++ 354 struct rm_ifdat *ifd; local in function:rmc_modclass 753 struct rm_ifdat *ifd = cl->ifdat_; local in function:rmc_queue_packet 881 struct rm_ifdat *ifd = cl->ifdat_; local in function:rmc_under_limit 1442 struct rm_ifdat *ifd = cl->ifdat_; local in function:rmc_drop_action 1453 struct rm_ifdat *ifd = cl->ifdat_; local in function:rmc_dropall 1574 struct rm_ifdat *ifd = cl->ifdat_; local in function:rmc_restart [all...] |
/src/sys/compat/linux/common/ |
linux_inotify.c | 278 struct inotifyfd *ifd; local in function:do_inotify_init 284 ifd = kmem_zalloc(sizeof(*ifd), KM_SLEEP); 285 mutex_init(&ifd->ifd_lock, MUTEX_DEFAULT, IPL_NONE); 286 mutex_init(&ifd->ifd_qlock, MUTEX_DEFAULT, IPL_NONE); 287 cv_init(&ifd->ifd_qcv, "inotify"); 288 selinit(&ifd->ifd_sel); 289 TAILQ_INIT(&ifd->ifd_qhead); 291 ifd->ifd_nwds = 1; 292 ifd->ifd_wds = kmem_zalloc(ifd->ifd_nwds * sizeof(*ifd->ifd_wds) 424 struct inotifyfd *ifd; local in function:linux_sys_inotify_add_watch 667 struct inotifyfd *ifd; local in function:linux_sys_inotify_rm_watch 1049 struct inotifyfd *ifd; local in function:inotify_filt_event 1140 struct inotifyfd *ifd = fp->f_data; local in function:inotify_read 1209 struct inotifyfd *ifd = fp->f_data; local in function:inotify_close 1249 struct inotifyfd *ifd = fp->f_data; local in function:inotify_poll 1273 struct inotifyfd *ifd = fp->f_data; local in function:inotify_kqfilter 1294 struct inotifyfd *ifd = ((file_t *)kn->kn_obj)->f_data; local in function:inotify_read_filt_detach 1307 struct inotifyfd *ifd = ((file_t *)kn->kn_obj)->f_data; local in function:inotify_read_filt_event 1326 struct inotifyfd *ifd = fp->f_data; local in function:inotify_restart [all...] |
/src/sbin/savecore/ |
savecore.c | 523 int nw, nr, ifd; local in function:save_kernel 525 ifd = Open(kernel, O_RDONLY); 526 while ((nr = read(ifd, buf, sizeof(buf))) > 0) { 647 int bounds, ifd, nr, nw, ofd, tryksyms; local in function:save_core 700 if ((ifd = open(rawp, O_RDONLY)) == -1) { 703 ifd = dumpfd; 707 ifd = dumpfd; 711 Lseek(ifd, dumplo, SEEK_SET); 727 nr = read(ifd, buf, MIN(dumpbytes, (off_t)sizeof(buf))); 747 (void)close(ifd); [all...] |
/src/usr.sbin/installboot/ |
evboards.c | 1666 int ifd = -1; local in function:evb_uboot_do_step 1737 ifd = open(uboot_file, O_RDONLY); 1738 if (ifd < 0) { 1742 if (fstat(ifd, &sb) < 0) { 1773 if (lseek(ifd, (off_t)file_offset, SEEK_SET) < 0) { 1828 (long long)lseek(ifd, 0, 1831 if (read(ifd, fill, this_inblock) 1857 if (ifd != -1 && close(ifd) == -1)
|
/src/sys/arch/mips/ralink/ |
ralink_eth.c | 1346 struct ifdrv * const ifd = (struct ifdrv *) data; local in function:ralink_eth_ioctl 1357 switch (ifd->ifd_cmd) { 1361 pt->mode = (int) ifd->ifd_len;
|
/src/sys/net/ |
if_bridge.c | 525 struct ifdrv *ifd = (struct ifdrv *) data; local in function:bridge_ioctl 533 if (ifd->ifd_cmd >= bridge_control_table_size 534 || (bc = &bridge_control_table[ifd->ifd_cmd]) == NULL) { 548 ifd, NULL, NULL); 575 && (ifd->ifd_len != bc->bc_argsize 576 || ifd->ifd_len > sizeof(args))) { 583 error = copyin(ifd->ifd_data, &args, ifd->ifd_len); 587 args.ifbifconf.ifbic_len = ifd->ifd_len; 588 args.ifbifconf.ifbic_buf = ifd->ifd_data [all...] |
if_wg.c | 4835 wg_alloc_prop_buf(char **_buf, struct ifdrv *ifd) 4840 WG_DLOG("buf=%p, len=%zu\n", ifd->ifd_data, ifd->ifd_len); 4841 if (ifd->ifd_len >= WG_MAX_PROPLEN) 4843 buf = kmem_alloc(ifd->ifd_len + 1, KM_SLEEP); 4844 error = copyin(ifd->ifd_data, buf, ifd->ifd_len); 4847 buf[ifd->ifd_len] = '\0'; 4850 log(LOG_DEBUG, "%.*s\n", (int)MIN(INT_MAX, ifd->ifd_len), 4859 wg_ioctl_set_private_key(struct wg_softc *wg, struct ifdrv *ifd) 5188 struct ifdrv *ifd = data; local in function:wg_ioctl [all...] |