| /netbsd/src/usr.sbin/mopd/common/ |
| D | print.c | 46 mopPrintHWA(FILE *fd, const u_char *ap) in mopPrintHWA() argument 48 (void)fprintf(fd, "%x:%x:%x:%x:%x:%x", in mopPrintHWA() 50 if (ap[0] < 10) (void)fprintf(fd, " "); in mopPrintHWA() 51 if (ap[1] < 10) (void)fprintf(fd, " "); in mopPrintHWA() 52 if (ap[2] < 10) (void)fprintf(fd, " "); in mopPrintHWA() 53 if (ap[3] < 10) (void)fprintf(fd, " "); in mopPrintHWA() 54 if (ap[4] < 10) (void)fprintf(fd, " "); in mopPrintHWA() 55 if (ap[5] < 10) (void)fprintf(fd, " "); in mopPrintHWA() 59 mopPrintBPTY(FILE *fd, u_char bpty) in mopPrintBPTY() argument 63 (void)fprintf(fd, "System Processor"); in mopPrintBPTY() [all …]
|
| D | rc.c | 39 mopDumpRC(FILE *fd, const u_char *pkt, int trans) in mopDumpRC() argument 63 (void)fprintf(fd,"Reserved : %02x\n",tmpc); in mopDumpRC() 66 (void)fprintf(fd,"Receipt Nbr : %04x\n",tmps); in mopDumpRC() 73 (void)fprintf(fd,"Verification : %04x\n",tmps); in mopDumpRC() 77 (void)fprintf(fd,"Verification : %08x\n",tmpl); in mopDumpRC() 80 (void)fprintf(fd,"Processor : %02x ",tmpc); in mopDumpRC() 81 mopPrintBPTY(fd, tmpc); (void)fprintf(fd, "\n"); in mopDumpRC() 84 (void)fprintf(fd,"Control : %02x ",control); in mopDumpRC() 86 (void)fprintf(fd, in mopDumpRC() 89 (void)fprintf(fd, in mopDumpRC() [all …]
|
| D | dl.c | 39 mopDumpDL(FILE *fd, const u_char *pkt, int trans) in mopDumpDL() argument 64 (void)fprintf(fd,"Load Number : %02x\n",tmpc); in mopDumpDL() 68 (void)fprintf(fd,"Load Address : %08x\n", tmpl); in mopDumpDL() 76 (void)fprintf(fd, in mopDumpDL() 80 (void)fprintf(fd, in mopDumpDL() 85 (void)fprintf(fd, "%02x ", in mopDumpDL() 88 (void)fprintf(fd,"\n"); in mopDumpDL() 92 (void)fprintf(fd,"\n"); in mopDumpDL() 99 (void)fprintf(fd,"Xfer Address : %08x\n", tmpl); in mopDumpDL() 110 (void)fprintf(fd,"Load Number : %02x\n",tmpc); in mopDumpDL() [all …]
|
| /netbsd/src/sys/arch/mac68k/obio/ |
| D | iwm_fd.c | 224 CFATTACH_DECL_NEW(fd, sizeof(fd_softc_t), 371 iwm->fd[ia.unit] = NULL; in iwm_attach() 434 fd_softc_t *fd; in fd_attach() local 439 fd = device_private(self); in fd_attach() 440 fd->sc_dev = self; in fd_attach() 445 fd->currentType = ia->driveType; in fd_attach() 446 fd->unit = ia->unit; in fd_attach() 447 fd->defaultType = &fdTypes[IWM_800K_GCR]; in fd_attach() 448 fd->stepDirection = 0; in fd_attach() 450 iwm->fd[ia->unit] = fd; /* iwm has ptr to this drive */ in fd_attach() [all …]
|
| /netbsd/src/tests/modules/ |
| D | t_kcov.c | 51 int fd; in open_kcov() local 53 fd = open("/dev/kcov", O_RDWR); in open_kcov() 54 if (fd == -1) in open_kcov() 57 return fd; in open_kcov() 104 int fd; in ATF_TC_BODY() local 106 fd = open_kcov(); in ATF_TC_BODY() 107 close(fd); in ATF_TC_BODY() 108 fd = open("/dev/kcov", O_RDWR); in ATF_TC_BODY() 109 ATF_REQUIRE(fd != -1); in ATF_TC_BODY() 111 close(fd); in ATF_TC_BODY() [all …]
|
| /netbsd/src/tests/kernel/ |
| D | t_memfd_create.c | 71 int fd; in ATF_TC_BODY() local 73 ATF_REQUIRE_EQ_MSG(fd = memfd_create(NULL, 0), -1, in ATF_TC_BODY() 87 int fd; in ATF_TC_BODY() local 92 ATF_REQUIRE_EQ_MSG(fd = memfd_create(name_buf, 0), -1, in ATF_TC_BODY() 98 RL(fd = memfd_create(name_buf, 0)); in ATF_TC_BODY() 110 int fd; in ATF_TC_BODY() local 115 RL(fd = memfd_create("", 0)); in ATF_TC_BODY() 119 RL(write(fd, write_buf, rwbuf_size)); in ATF_TC_BODY() 120 offset = lseek(fd, 0, SEEK_CUR); in ATF_TC_BODY() 125 RL(lseek(fd, 0, SEEK_SET)); in ATF_TC_BODY() [all …]
|
| /netbsd/src/games/hack/ |
| D | hack.lev.c | 85 savelev(int fd, xchar lev) in savelev() argument 92 if (fd < 0) in savelev() 97 bwrite(fd, &hackpid, sizeof(hackpid)); in savelev() 98 bwrite(fd, &lev, sizeof(lev)); in savelev() 99 bwrite(fd, levl, sizeof(levl)); in savelev() 100 bwrite(fd, &moves, sizeof(long)); in savelev() 101 bwrite(fd, &xupstair, sizeof(xupstair)); in savelev() 102 bwrite(fd, &yupstair, sizeof(yupstair)); in savelev() 103 bwrite(fd, &xdnstair, sizeof(xdnstair)); in savelev() 104 bwrite(fd, &ydnstair, sizeof(ydnstair)); in savelev() [all …]
|
| D | hack.save.c | 101 int fd, ofd; in dosave0() local 106 if ((fd = creat(SAVEF, FMASK)) < 0) { in dosave0() 114 savelev(fd, dlevel); in dosave0() 115 saveobjchn(fd, invent); in dosave0() 116 saveobjchn(fd, fcobj); in dosave0() 117 savemonchn(fd, fallen_down); in dosave0() 119 bwrite(fd, &tmp, sizeof tmp); in dosave0() 120 bwrite(fd, &flags, sizeof(struct flag)); in dosave0() 121 bwrite(fd, &dlevel, sizeof dlevel); in dosave0() 122 bwrite(fd, &maxdlevel, sizeof maxdlevel); in dosave0() [all …]
|
| /netbsd/src/sys/arch/atari/dev/ |
| D | hdfd.c | 528 struct fd_softc *fd = device_private(self); in fdattach() local 533 fd->sc_dev = self; in fdattach() 534 callout_init(&fd->sc_motoron_ch, 0); in fdattach() 535 callout_init(&fd->sc_motoroff_ch, 0); in fdattach() 545 bufq_alloc(&fd->sc_q, "disksort", BUFQ_SORT_CYLINDER); in fdattach() 546 fd->sc_cylin = -1; in fdattach() 547 fd->sc_drive = drive; in fdattach() 548 fd->sc_deftype = type; in fdattach() 549 fdc->sc_fd[drive] = fd; in fdattach() 554 disk_init(&fd->sc_dk, device_xname(self), &fddkdriver); in fdattach() [all …]
|
| /netbsd/src/sys/dev/isa/ |
| D | fd.c | 215 CFATTACH_DECL_NEW(fd, sizeof(struct fd_softc), 272 void fdfinish(struct fd_softc *fd, struct buf *bp); 275 static void fd_set_geometry(struct fd_softc *fd); 320 struct fd_softc *fd; in fdcsuspend() local 326 if ((fd = fdc->sc_fd[drive]) == NULL) in fdcsuspend() 328 fd->sc_flags &= ~(FD_MOTOR|FD_MOTOR_WAIT); in fdcsuspend() 339 struct fd_softc *fd = device_private(child); in fdc_childdet() local 340 int drive = fd->sc_drive; in fdc_childdet() 342 KASSERT(fdc->sc_fd[drive] == fd); /* but the kid is not my son */ in fdc_childdet() 560 struct fd_softc *fd = device_private(self); in fdattach() local [all …]
|
| /netbsd/src/usr.sbin/sdpd/ |
| D | server.c | 150 int opt, fd; in server_open_control() local 159 fd = socket(PF_LOCAL, SOCK_STREAM, 0); in server_open_control() 160 if (fd == -1) { in server_open_control() 168 if (setsockopt(fd, SOL_LOCAL, LOCAL_CREDS, &opt, sizeof(opt)) == -1) in server_open_control() 176 if (bind(fd, (struct sockaddr *) &un, sizeof(un)) == -1) { in server_open_control() 180 close(fd); in server_open_control() 188 close(fd); in server_open_control() 192 if (listen(fd, 5) == -1) { in server_open_control() 196 close(fd); in server_open_control() 201 if (fd > srv->fdmax) in server_open_control() [all …]
|
| /netbsd/src/sys/arch/x68k/dev/ |
| D | fd.c | 263 CFATTACH_DECL_NEW(fd, sizeof(struct fd_softc), 629 struct fd_softc *fd = device_private(self); in fdattach() local 635 callout_init(&fd->sc_motoron_ch, 0); in fdattach() 637 callout_init(&fd->sc_motoroff_ch, 0); in fdattach() 639 fd->sc_dev = self; in fdattach() 640 fd->sc_flags = 0; in fdattach() 648 bufq_alloc(&fd->sc_q, "disksort", BUFQ_SORT_CYLINDER); in fdattach() 649 fd->sc_cylin = -1; in fdattach() 650 fd->sc_drive = drive; in fdattach() 651 fd->sc_deftype = type; in fdattach() [all …]
|
| /netbsd/src/sys/arch/arc/jazz/ |
| D | fd.c | 180 CFATTACH_DECL_NEW(fd, sizeof(struct fd_softc), fdprobe, fdattach, NULL, NULL); 337 struct fd_softc *fd = device_private(self); in fdattach() local 342 fd->sc_dev = self; in fdattach() 344 callout_init(&fd->sc_motoron_ch, 0); in fdattach() 345 callout_init(&fd->sc_motoroff_ch, 0); in fdattach() 355 bufq_alloc(&fd->sc_q, "disksort", BUFQ_SORT_CYLINDER); in fdattach() 356 fd->sc_cylin = -1; in fdattach() 357 fd->sc_drive = drive; in fdattach() 358 fd->sc_deftype = type; in fdattach() 359 fdc->sc_fd[drive] = fd; in fdattach() [all …]
|
| /netbsd/src/sys/arch/sun3/dev/ |
| D | fd.c | 271 CFATTACH_DECL_NEW(fd, sizeof(struct fd_softc), 566 struct fd_softc *fd = device_private(self); in fdattach() local 571 fd->sc_dv = self; in fdattach() 573 callout_init(&fd->sc_motoron_ch, 0); in fdattach() 574 callout_init(&fd->sc_motoroff_ch, 0); in fdattach() 584 bufq_alloc(&fd->sc_q, "disksort", BUFQ_SORT_CYLINDER); in fdattach() 585 fd->sc_cylin = -1; in fdattach() 586 fd->sc_drive = drive; in fdattach() 587 fd->sc_deftype = type; in fdattach() 588 fdc->sc_fd[drive] = fd; in fdattach() [all …]
|
| /netbsd/src/sys/arch/acorn32/mainbus/ |
| D | fd.c | 257 CFATTACH_DECL_NEW(fd, sizeof(struct fd_softc), 315 void fdfinish(struct fd_softc *fd, struct buf *bp); 497 struct fd_softc *fd = device_private(self); in fdattach() local 502 fd->sc_dev = self; in fdattach() 504 callout_init(&fd->sc_motoron_ch, 0); in fdattach() 505 callout_init(&fd->sc_motoroff_ch, 0); in fdattach() 515 bufq_alloc(&fd->sc_q, "disksort", BUFQ_SORT_CYLINDER); in fdattach() 516 fd->sc_cylin = -1; in fdattach() 517 fd->sc_drive = drive; in fdattach() 518 fd->sc_deftype = type; in fdattach() [all …]
|
| /netbsd/src/tests/fs/vfs/ |
| D | t_io.c | 53 int fd; in holywrite() local 57 RL(fd = rump_sys_open("file", O_RDWR|O_CREAT|O_TRUNC, 0666)); in holywrite() 60 RL(rump_sys_pwrite(fd, buf, 1, getpagesize())); in holywrite() 63 RL(rump_sys_pwrite(fd, buf, 2, getpagesize()-1)); in holywrite() 68 RL(rump_sys_pread(fd, b2, therange, 0)); in holywrite() 75 rump_sys_close(fd); in holywrite() 84 int fd; in extendbody() local 87 RL(fd = rump_sys_open("testfile", in extendbody() 89 RL(rump_sys_ftruncate(fd, seekcnt)); in extendbody() 90 RL(rump_sys_fstat(fd, &sb)); in extendbody() [all …]
|
| /netbsd/src/external/bsd/libbind/dist/isc/ |
| D | ev_files.c | 44 static evFile *FindFD(const evContext_p *ctx, int fd, int eventmask); 48 int fd, in evSelectFD() argument 60 ctx, fd, eventmask, func, uap); in evSelectFD() 64 if (fd > ctx->highestFD) in evSelectFD() 67 OK(mode = fcntl(fd, F_GETFL, NULL)); /*%< side effect: validate fd. */ in evSelectFD() 76 if (fd >= ctx->maxnfds && evPollfdRealloc(ctx, 1, fd) != 0) in evSelectFD() 79 id = FindFD(ctx, fd, EV_MASK_ALL); in evSelectFD() 82 FD_SET(fd, &ctx->nonblockBefore); in evSelectFD() 86 OK(ioctl(fd, FIONBIO, (char *)&on)); in evSelectFD() 88 OK(fcntl(fd, F_SETFL, mode | PORT_NONBLOCK)); in evSelectFD() [all …]
|
| /netbsd/src/crypto/external/cpl/trousers/dist/src/tcs/ |
| D | tcs_key_ps.c | 33 int fd; in ps_init_disk_cache() local 38 if ((fd = get_file()) < 0) in ps_init_disk_cache() 41 if ((rc = init_disk_cache(fd))) in ps_init_disk_cache() 46 if ((rc = clean_disk_cache(fd))) in ps_init_disk_cache() 49 put_file(fd); in ps_init_disk_cache() 56 int fd; in ps_close_disk_cache() local 58 if ((fd = get_file()) < 0) { in ps_close_disk_cache() 63 close_disk_cache(fd); in ps_close_disk_cache() 65 put_file(fd); in ps_close_disk_cache() 72 int fd; in ps_is_key_registered() local [all …]
|
| /netbsd/src/bin/sh/ |
| D | redir.c | 87 #define CLOEXEC(fd) (fcntl((fd), F_SETFD, \ argument 88 (fcntl_int)(fcntl((fd), F_GETFD) | FD_CLOEXEC))) 90 #define CLOEXEC(fd) __nothing argument 143 int fd; member 153 is_renamed(const struct renamelist *rl, int fd) in is_renamed() argument 156 if (rl->orig == fd) in is_renamed() 164 saved_redirected_fd(int fd) in saved_redirected_fd() argument 171 if (rl->into == fd) in saved_redirected_fd() 261 int fd; in redirect() local 282 fd = n->nfile.fd; in redirect() [all …]
|
| /netbsd/src/tests/lib/libc/sys/ |
| D | t_timerfd.c | 57 int fd; member 102 timerfd_read(int fd, uint64_t *valp) in timerfd_read() argument 106 switch (read(fd, &val, sizeof(val))) { in timerfd_read() 130 int fd; in ATF_TC_BODY() local 132 ATF_REQUIRE((fd = timerfd_create(CLOCK_REALTIME, 0)) >= 0); in ATF_TC_BODY() 133 (void) close(fd); in ATF_TC_BODY() 135 ATF_REQUIRE((fd = timerfd_create(CLOCK_MONOTONIC, 0)) >= 0); in ATF_TC_BODY() 136 (void) close(fd); in ATF_TC_BODY() 139 (fd = timerfd_create(CLOCK_VIRTUAL, 0)) == -1); in ATF_TC_BODY() 142 (fd = timerfd_create(CLOCK_PROF, 0)) == -1); in ATF_TC_BODY() [all …]
|
| /netbsd/src/external/ibm-public/postfix/dist/src/util/ |
| D | events.c | 182 #define EVENT_MASK_SET(fd, mask) FD_SET((fd), (mask)) argument 183 #define EVENT_MASK_ISSET(fd, mask) FD_ISSET((fd), (mask)) argument 184 #define EVENT_MASK_CLR(fd, mask) FD_CLR((fd), (mask)) argument 199 #define EVENT_MASK_FD_BYTE(fd, mask) \ argument 200 (((unsigned char *) (mask)->data)[(fd) / EVENT_MASK_NBBY]) 201 #define EVENT_MASK_FD_BIT(fd) (1 << ((fd) % EVENT_MASK_NBBY)) argument 226 #define EVENT_MASK_SET(fd, mask) \ argument 227 (EVENT_MASK_FD_BYTE((fd), (mask)) |= EVENT_MASK_FD_BIT(fd)) 228 #define EVENT_MASK_ISSET(fd, mask) \ argument 229 (EVENT_MASK_FD_BYTE((fd), (mask)) & EVENT_MASK_FD_BIT(fd)) [all …]
|
| /netbsd/src/sys/arch/sparc/dev/ |
| D | fd.c | 297 CFATTACH_DECL_NEW(fd, sizeof(struct fd_softc), 782 struct fd_softc *fd = device_private(self); in fdattach() local 787 fd->sc_dv = self; in fdattach() 789 callout_init(&fd->sc_motoron_ch, 0); in fdattach() 790 callout_init(&fd->sc_motoroff_ch, 0); in fdattach() 800 bufq_alloc(&fd->sc_q, "disksort", BUFQ_SORT_CYLINDER); in fdattach() 801 fd->sc_cylin = -1; in fdattach() 802 fd->sc_drive = drive; in fdattach() 803 fd->sc_deftype = type; in fdattach() 804 fdc->sc_fd[drive] = fd; in fdattach() [all …]
|
| /netbsd/src/external/gpl3/gdb/dist/gdb/testsuite/gdb.python/ |
| D | py-doc-reformat.exp | 66 set fd [open $python_filename w] 68 puts $fd "class test_cmd (gdb.Command):" 69 puts $fd $input_docs 70 puts $fd "" 71 puts $fd " def __init__ (self):" 72 puts $fd " super ().__init__ (\"test-cmd\", gdb.COMMAND_OBSCURE)" 73 puts $fd "" 74 puts $fd " def invoke (self, arg, from_tty):" 75 puts $fd " print (\"In test-cmd\")" 76 puts $fd "" [all …]
|
| /netbsd/src/sys/arch/sparc64/dev/ |
| D | fdc.c | 329 CFATTACH_DECL_NEW(fd, sizeof(struct fd_softc), 954 struct fd_softc *fd = device_private(self); local 959 fd->sc_dev = self; 960 callout_init(&fd->sc_motoron_ch, 0); 961 callout_init(&fd->sc_motoroff_ch, 0); 971 bufq_alloc(&fd->sc_q, "disksort", BUFQ_SORT_CYLINDER); 972 fd->sc_cylin = -1; 973 fd->sc_drive = drive; 974 fd->sc_deftype = type; 975 fdc->sc_fd[drive] = fd; [all …]
|
| /netbsd/src/lib/libc/rpc/ |
| D | svc_fdset.c | 110 int fd = fds->fdp[i].fd; in svc_fdset_print() local 111 if (fd == -1) in svc_fdset_print() 113 fprintf(stderr, "%s%d", did, fd); in svc_fdset_print() 170 pfd[i].fd = -1; in svc_pollfd_init() 192 svc_pollfd_add(int fd, struct svc_fdset *fds) in svc_pollfd_add() argument 200 if (pfd[i].fd == -1) { in svc_pollfd_add() 204 fd, i, fds->fdused); in svc_pollfd_add() 205 pfd[i].fd = fd; in svc_pollfd_add() 214 pfd[fds->fdnum].fd = fd; in svc_pollfd_add() 216 DPRINTF("add fd=%d slot=%d fdused=%d", fd, fds->fdnum, fds->fdused); in svc_pollfd_add() [all …]
|