Home
last modified time | relevance | path

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

12345678910>>...119

/netbsd-src/usr.sbin/mopd/common/
H A Dprint.c46 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 …]
H A Drc.c39 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 …]
H A Ddl.c39 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/
H A Diwm_fd.c224 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/
H A Dt_kcov.c51 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/external/bsd/dhcpcd/dist/src/
H A Dcontrol.c59 control_queue_free(struct fd_list *fd) in control_queue_free() argument
63 while ((fdp = TAILQ_FIRST(&fd->queue))) { in control_queue_free()
64 TAILQ_REMOVE(&fd->queue, fdp, next); in control_queue_free()
71 while ((fdp = TAILQ_FIRST(&fd->free_queue))) { in control_queue_free()
72 TAILQ_REMOVE(&fd->free_queue, fdp, next); in control_queue_free()
81 control_free(struct fd_list *fd) in control_free() argument
85 if (fd->ctx->ps_control_client == fd) in control_free()
86 fd->ctx->ps_control_client = NULL; in control_free()
89 eloop_event_delete(fd->ctx->eloop, fd->fd); in control_free()
90 close(fd->fd); in control_free()
[all …]
/netbsd-src/tests/kernel/
H A Dt_memfd_create.c59 int fd; in ATF_TC_BODY() local
61 ATF_REQUIRE_EQ_MSG(fd = memfd_create(NULL, 0), -1, in ATF_TC_BODY()
75 int fd; in ATF_TC_BODY() local
80 ATF_REQUIRE_EQ_MSG(fd = memfd_create(name_buf, 0), -1, in ATF_TC_BODY()
86 RL(fd = memfd_create(name_buf, 0)); in ATF_TC_BODY()
98 int fd; in ATF_TC_BODY() local
101 RL(fd = memfd_create("", 0)); in ATF_TC_BODY()
106 RL(write(fd, write_buf, sizeof(write_buf))); in ATF_TC_BODY()
107 offset = lseek(fd, 0, SEEK_CUR); in ATF_TC_BODY()
112 RL(lseek(fd, 0, SEEK_SET)); in ATF_TC_BODY()
[all …]
/netbsd-src/games/hack/
H A Dhack.lev.c85 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 …]
H A Dhack.save.c101 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/
H A Dhdfd.c528 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/
H A Dfd.c215 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/
H A Dserver.c150 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/tests/lib/libossaudio/
H A Dt_ossaudio.c48 int fd, channels, fmt, rate; in ATF_TC_BODY() local
50 if ((fd = open("/dev/audio", O_WRONLY)) == -1) in ATF_TC_BODY()
53 if (ioctl(fd, AUDIO_GETFORMAT, &hwinfo) < 0) { in ATF_TC_BODY()
55 close(fd); in ATF_TC_BODY()
61 if (ioctl(fd, SNDCTL_DSP_CHANNELS, &channels) < 0) in ATF_TC_BODY()
65 if (ioctl(fd, AUDIO_GETBUFINFO, &info) < 0) in ATF_TC_BODY()
72 if (ioctl(fd, SNDCTL_DSP_CHANNELS, &channels) < 0) in ATF_TC_BODY()
76 if (ioctl(fd, AUDIO_GETBUFINFO, &info) < 0) in ATF_TC_BODY()
86 if (ioctl(fd, SNDCTL_DSP_CHANNELS, &channels) < 0) in ATF_TC_BODY()
90 if (ioctl(fd, AUDIO_GETBUFINFO, &info) < 0) in ATF_TC_BODY()
[all …]
/netbsd-src/sys/arch/x68k/dev/
H A Dfd.c263 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/
H A Dfd.c180 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/
H A Dfd.c1 /* $NetBSD: fd.c,v 1.89 2024/12/21 17:40:11 tsutsui Exp $ */
34 * @(#)fd.c 7.4 (Berkeley) 5/25/91
71 * @(#)fd.c 7.4 (Berkeley) 5/25/91
75 __KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.89 2024/12/21 17:40:11 tsutsui Exp $");
112 * Print a complaint when no fd children were specified
121 #error "fdc but no fd?"
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 in fdattach()
639 struct fd_softc *fd; fd_shutdown() local
648 fd_dev_to_type(struct fd_softc * fd,dev_t dev) fd_dev_to_type() argument
660 struct fd_softc *fd; fdstrategy() local
733 fdstart(struct fd_softc * fd) fdstart() argument
748 fdfinish(struct fd_softc * fd,struct buf * bp) fdfinish() argument
796 struct fd_softc *fd; fd_set_motor() local
815 struct fd_softc *fd = arg; fd_motor_off() local
827 struct fd_softc *fd = arg; fd_motor_on() local
883 struct fd_softc *fd; fdopen() local
928 struct fd_softc *fd = device_lookup_private(&fd_cd, FDUNIT(dev)); fdclose() local
1037 struct fd_softc *fd = TAILQ_FIRST(&fdc->sc_drives); fdctimeout() local
1163 struct fd_softc *fd; fdcstate() local
1545 struct fd_softc *fd; fdcretry() local
1592 struct fd_softc *fd = device_lookup_private(&fd_cd, FDUNIT(dev)); fdioctl() local
1827 struct fd_softc *fd = device_lookup_private(&fd_cd, FDUNIT(dev)); fdformat() local
1871 struct fd_softc *fd = device_lookup_private(&fd_cd, unit); fdgetdisklabel() local
1947 struct fd_softc *fd; fd_mountroot_hook() local
1979 struct fd_softc *fd; fd_read_md_image() local
[all...]
/netbsd-src/sys/arch/acorn32/mainbus/
H A Dfd.c257 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/
H A Dt_io.c53 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/
H A Dev_files.c44 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/
H A Dtcs_key_ps.c33 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/external/gpl3/gcc.old/dist/libsanitizer/tsan/
H A Dtsan_fd.cc43 static bool bogusfd(int fd) { in bogusfd() argument
45 return fd < 0 || fd >= kTableSize; in bogusfd()
72 static FdDesc *fddesc(ThreadState *thr, uptr pc, int fd) { in fddesc() argument
73 CHECK_GE(fd, 0); in fddesc()
74 CHECK_LT(fd, kTableSize); in fddesc()
75 atomic_uintptr_t *pl1 = &fdctx.tab[fd / kTableSizeL2]; in fddesc()
88 return &((FdDesc*)l1)[fd % kTableSizeL2]; // NOLINT in fddesc()
92 static void init(ThreadState *thr, uptr pc, int fd, FdSync *s, in init() argument
94 FdDesc *d = fddesc(thr, pc, fd); in init()
141 bool FdLocation(uptr addr, int *fd, int *tid, u32 *stack) { in FdLocation() argument
[all …]
/netbsd-src/sys/external/bsd/compiler_rt/dist/lib/tsan/rtl/
H A 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 …]
/netbsd-src/external/ibm-public/postfix/dist/src/util/
H A Devents.c182 #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/tests/lib/libc/sys/
H A Dt_timerfd.c57 int fd;
102 timerfd_read(int fd, uint64_t *valp) in timerfd_read()
106 switch (read(fd, &val, sizeof(val))) { in timerfd_read()
130 int fd; in ATF_TC_BODY()
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 in ATF_TC_BODY()
54 int fd; global() member
99 timerfd_read(int fd,uint64_t * valp) timerfd_read() argument
127 int fd; ATF_TC_BODY() local
157 int fd; ATF_TC_BODY() local
182 int fd; ATF_TC_BODY() local
218 int fd; ATF_TC_BODY() local
257 int fd; ATF_TC_BODY() local
296 int fd; ATF_TC_BODY() local
343 int fd; ATF_TC_BODY() local
383 int fd; ATF_TC_BODY() local
495 int fd; ATF_TC_BODY() local
[all...]
/netbsd-src/sys/arch/sparc/dev/
H A Dfd.c297 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 …]

12345678910>>...119