/netbsd-6-1-5-RELEASE/external/gpl3/gdb/dist/readline/examples/ |
H A D | rl.c | 3 * (or another fd) using readline. 87 int opt, fd, nch; local 98 fd = nch = 0; 109 fd = atoi(optarg); 110 if (fd < 0) 133 if (fd != 0) 135 if (fstat (fd, &sb) < 0) 137 fprintf (stderr, "%s: %d: bad file descriptor\n", progname, fd); 140 ifp = fdopen (fd, "r");
|
/netbsd-6-1-5-RELEASE/external/ibm-public/postfix/dist/src/global/ |
H A D | deliver_flock.c | 11 /* int deliver_flock(fd, lock_style, why) 12 /* int fd; 22 /* .IP fd 69 int deliver_flock(int fd, int lock_style, VSTRING *why) argument 74 if (myflock(fd, lock_style,
|
/netbsd-6-1-5-RELEASE/external/ibm-public/postfix/dist/src/util/ |
H A D | peekfd.c | 11 /* ssize_t peekfd(fd) 12 /* int fd; 53 ssize_t peekfd(int fd) argument 62 return (ioctl(fd, FIONREAD, (char *) &count) < 0 ? -1 : count);
|
H A D | read_wait.c | 11 /* int read_wait(fd, timeout) 12 /* int fd; 19 /* .IP fd 65 int read_wait(int fd, int timeout) argument 76 if (FD_SETSIZE <= fd) 77 msg_panic("descriptor %d does not fit FD_SETSIZE %d", fd, FD_SETSIZE); 86 FD_SET(fd, &read_fds); 88 FD_SET(fd, &except_fds); 98 switch (select(fd + 1, &read_fds, (fd_set *) 0, &except_fds, tp)) { 119 pollfd.fd [all...] |
H A D | write_wait.c | 11 /* int write_wait(fd, timeout) 12 /* int fd; 19 /* .IP fd 64 int write_wait(int fd, int timeout) argument 75 if (FD_SETSIZE <= fd) 76 msg_panic("descriptor %d does not fit FD_SETSIZE %d", fd, FD_SETSIZE); 85 FD_SET(fd, &write_fds); 87 FD_SET(fd, &except_fds); 97 switch (select(fd + 1, (fd_set *) 0, &write_fds, &except_fds, tp)) { 118 pollfd.fd [all...] |
/netbsd-6-1-5-RELEASE/tests/kernel/ |
H A D | t_rnd.c | 54 int fd; local 57 fd = rump_sys_open("/dev/random", O_RDWR, 0); 58 if (fd == -1) 63 if (rump_sys_ioctl(fd, RNDADDDATA, &rd) == -1) 76 int fd; local 79 fd = rump_sys_open("/dev/random", O_RDWR, 0); 80 if (fd == -1) 85 ATF_REQUIRE_ERRNO(EINVAL, rump_sys_ioctl(fd, RNDADDDATA, &rd) == -1);
|
/netbsd-6-1-5-RELEASE/sys/external/bsd/drm/dist/tests/ |
H A D | setversion.c | 40 int fd, ret; local 48 fd = drm_open_any_master(); 56 ret = ioctl(fd, DRM_IOCTL_SET_VERSION, &version); 66 ret = ioctl(fd, DRM_IOCTL_SET_VERSION, &sv); 72 ret = ioctl(fd, DRM_IOCTL_SET_VERSION, &sv); 78 ret = ioctl(fd, DRM_IOCTL_SET_VERSION, &sv); 84 ret = ioctl(fd, DRM_IOCTL_SET_VERSION, &sv); 87 close(fd);
|
/netbsd-6-1-5-RELEASE/sys/arch/alpha/stand/common/ |
H A D | common.h | 59 #define booted_dev_setfd(fd) ((void)(booted_dev_fd = fd))
|
/netbsd-6-1-5-RELEASE/dist/ipf/ipsend/ |
H A D | sbpf.c | 71 int fd; local 73 if ((fd = open(bpfname, O_RDWR)) < 0) 80 int fd = 0, i; local 85 if ((fd = open(bpfname, O_RDWR)) >= 0) 95 if (ioctl(fd, BIOCVERSION, (caddr_t)&bv) < 0) 111 if (ioctl(fd, BIOCSETIF, &ifr) == -1) 113 fprintf(stderr, "%s(%d):", ifr.ifr_name, fd); 120 if (ioctl(fd, BIOCGBLEN, &bufsize) == -1) 132 if (ioctl(fd, BIOCSRTIMEOUT, (caddr_t)&to) == -1) 138 (void) ioctl(fd, BIOCFLUS [all...] |
/netbsd-6-1-5-RELEASE/external/gpl3/gcc/dist/gcc/testsuite/lib/ |
H A D | gcc-gdb-test.exp | 47 set fd [open $cmd_file "w"] 48 puts $fd "break [lindex $args 0]" 49 puts $fd "run" 50 puts $fd "print [lindex $args 1]" 51 puts $fd "print [lindex $args 2]" 52 puts $fd "quit" 53 close $fd
|
/netbsd-6-1-5-RELEASE/sys/arch/zaurus/stand/zboot/ |
H A D | loadfile_zboot.c | 41 static int fdloadfile_zboot(int fd, u_long *marks, int flags); 42 static int zboot_exec(int fd, u_long *marks, int flags); 47 int fd, error; local 50 if ((fd = open(fname, 0)) < 0) { 56 if ((error = fdloadfile_zboot(fd, marks, flags)) != 0) { 57 (void)close(fd); 62 return fd; 66 fdloadfile_zboot(int fd, u_long *marks, int flags) argument 73 if (lseek(fd, 0, SEEK_SET) == (off_t)-1) 75 nr = read(fd, 101 zboot_exec(int fd, u_long *marks, int flags) argument [all...] |
/netbsd-6-1-5-RELEASE/usr.sbin/sesd/srcs/ |
H A D | getencstat.c | 56 int fd, nobj, f, i, verbose, quiet, errors; local 77 fd = open(*v, O_RDONLY); 78 if (fd < 0) { 82 if (ioctl(fd, SESIOC_GETNOBJ, (caddr_t) &nobj) < 0) { 84 (void) close(fd); 87 if (ioctl(fd, SESIOC_GETENCSTAT, (caddr_t) &estat) < 0) { 89 (void) close(fd); 95 (void) close(fd); 125 (void) close(fd); 128 if (ioctl(fd, SESIOC_GETOBJMA [all...] |
H A D | getobjstat.c | 50 int fd; local 61 fd = open(v[1], O_RDONLY); 62 if (fd < 0) { 72 if (ioctl(fd, SESIOC_GETOBJSTAT, (caddr_t) &obj) < 0) { 78 (void) close(fd);
|
H A D | setobjstat.c | 51 int fd; local 63 fd = open(v[1], O_RDWR); 64 if (fd < 0) { 82 if (ioctl(fd, SESIOC_SETOBJSTAT, (caddr_t) &obj) < 0) { 85 (void) close(fd);
|
/netbsd-6-1-5-RELEASE/tests/fs/union/ |
H A D | t_pr.c | 66 int fd, res; local 80 fd = rump_sys_open("/mp/null", O_WRONLY | O_CREAT | O_TRUNC); 82 if (fd == -1) 85 res = rump_sys_write(fd, &fd, sizeof(fd)); 86 if (res != sizeof(fd)) 100 int fd, res; local 114 fd = rump_sys_open("/mp/null", O_WRONLY | O_CREAT | O_APPEND); 115 if (fd [all...] |
/netbsd-6-1-5-RELEASE/tests/lib/libc/gen/ |
H A D | t_ttyname.c | 51 int fd; local 53 fd = open("XXX", O_RDONLY); 55 if (fd < 0) { 59 ATF_REQUIRE(isatty(fd) != -1); 64 ATF_REQUIRE(ttyname(fd) == NULL); 68 fd = open("/etc/passwd", O_RDONLY); 70 if (fd >= 0) { 74 ATF_REQUIRE(isatty(fd) != -1); 79 ATF_REQUIRE(ttyname(fd) == NULL); 94 int fd; local [all...] |
/netbsd-6-1-5-RELEASE/sys/kern/ |
H A D | subr_exec_fd.c | 49 int fd; local 56 for (fd = 0; fd <= fdp->fd_lastfile; fd++) { 57 if ((ff = dt->dt_ff[fd]) == NULL) { 58 KASSERT(fd >= NDFDFILE); 61 KASSERT(fd >= NDFDFILE || 62 ff == (fdfile_t *)fdp->fd_dfdfile[fd]); 65 ktr_execfd(fd, ff->ff_file->f_type); 87 int fd, local [all...] |
/netbsd-6-1-5-RELEASE/sbin/rndctl/ |
H A D | rndctl.c | 134 int fd; local 136 fd = open("/dev/urandom", O_RDONLY, 0644); 137 if (fd < 0) { 141 if (ioctl(fd, RNDGETPOOLSTAT, &rp) < 0) { 147 if (read(fd, rs.data, sizeof(rs.data)) != sizeof(rs.data)) { 151 if (ioctl(fd, RNDGETPOOLSTAT, &rp) < 0) { 168 close(fd); 170 fd = open(filename, O_CREAT|O_EXCL|O_WRONLY, 0600); 171 if (fd < 0) { 175 if (write(fd, 187 int fd; local 238 int fd; local 281 int fd; local 340 int fd; local [all...] |
/netbsd-6-1-5-RELEASE/external/gpl3/gdb/dist/gdb/ |
H A D | mingw-hdep.c | 105 int fd; local 112 for (fd = 0; fd < n; ++fd) 120 gdb_assert (!writefds || !FD_ISSET (fd, writefds)); 122 if ((!readfds || !FD_ISSET (fd, readfds)) 123 && (!exceptfds || !FD_ISSET (fd, exceptfds))) 126 scb = serial_for_fd (fd); 134 read = (HANDLE) _get_osfhandle (fd); 143 if (readfds && FD_ISSET (fd, readfd [all...] |
/netbsd-6-1-5-RELEASE/external/gpl3/gdb/dist/sim/testsuite/sim/cris/c/ |
H A D | seek4.c | 20 int fd; local 31 fd = open (fname, O_RDONLY); 32 if (fd < 0 33 || lseek (fd, -1L, SEEK_CUR) != -1 35 || read (fd, buf, strlen (tsttxt)) != strlen (tsttxt)
|
/netbsd-6-1-5-RELEASE/sys/arch/sbmips/stand/common/ |
H A D | bootxx.c | 85 int fd; local 98 fd = open("boot", 0); 99 if (fd == -1 || (fstat(fd, &sb) == -1)) { 109 if (read(fd, (void*)SECONDARY_LOAD_ADDRESS, sb.st_size) != sb.st_size) {
|
/netbsd-6-1-5-RELEASE/usr.sbin/btattach/ |
H A D | init_bcm2035.c | 51 init_bcm2035(int fd, unsigned int speed) argument 55 uart_send_cmd(fd, HCI_CMD_RESET, NULL, 0); 57 uart_recv_cc(fd, HCI_CMD_RESET, NULL, 0); 73 uart_send_cmd(fd, HCI_CMD_BCM2035_SET_UART_BAUD_RATE, &rate, sizeof(rate)); 74 uart_recv_cc(fd, HCI_CMD_BCM2035_SET_UART_BAUD_RATE, NULL, 0);
|
H A D | init_bgb2xx.c | 58 init_bgb2xx(int fd, unsigned int speed) argument 70 uart_send_cmd(fd, HCI_CMD_ST_STORE_IN_NVDS, &cp, sizeof(cp)); 71 uart_recv_cc(fd, HCI_CMD_ST_STORE_IN_NVDS, NULL, 0); 74 uart_send_cmd(fd, HCI_CMD_RESET, NULL, 0); 75 uart_recv_cc(fd, HCI_CMD_RESET, NULL, 0);
|
/netbsd-6-1-5-RELEASE/tests/lib/libc/stdlib/ |
H A D | t_system.c | 51 int fd, i = 2; local 60 fd = open(path, O_RDONLY); 61 ATF_REQUIRE(fd >= 0); 65 ATF_REQUIRE(read(fd, buf, 21) == 21); 68 ATF_REQUIRE(close(fd) == 0);
|
/netbsd-6-1-5-RELEASE/tests/lib/libc/sys/ |
H A D | t_pipe2.c | 51 int fd[2], i; local 58 ATF_REQUIRE(pipe2(fd, flags) == 0); 60 ATF_REQUIRE(fd[0] == 3); 61 ATF_REQUIRE(fd[1] == 4); 64 ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOEXEC) != 0); 65 ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOEXEC) != 0); 67 ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOEXEC) == 0); 68 ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOEXEC) == 0); 72 ATF_REQUIRE((fcntl(fd[0], F_GETFL) & O_NONBLOCK) != 0); 73 ATF_REQUIRE((fcntl(fd[ 176 int fd[2]; local [all...] |