Searched refs:fd (Results 276 - 300 of 2727) sorted by relevance

<<11121314151617181920>>

/netbsd-6-1-5-RELEASE/tests/lib/libc/sys/
H A Dt_write.c67 int fd; local
72 fd = open(path, O_RDWR | O_CREAT);
74 if (fd >= 0) {
77 ATF_REQUIRE_ERRNO(0, write(fd, wbuf, 3) == 3);
80 ATF_REQUIRE_ERRNO(EINVAL, write(fd, wbuf, SIZE_MAX) == -1);
83 ATF_REQUIRE_ERRNO(EFAULT, write(fd, (void *)-1, 1) == -1);
89 ATF_REQUIRE(lseek(fd, 0, SEEK_SET) == 0);
90 ATF_REQUIRE(read(fd, rbuf, 3) == 3);
93 (void)close(fd);
142 int fd; local
172 int fd; local
[all...]
/netbsd-6-1-5-RELEASE/sys/arch/alpha/stand/common/
H A Dbootxx.c89 int fd; local
101 fd = open("boot", 0);
102 if (fd == -1 || (fstat(fd, &sb) == -1)) {
112 if (read(fd, (void*)SECONDARY_LOAD_ADDRESS, sb.st_size) != sb.st_size) {
/netbsd-6-1-5-RELEASE/sys/arch/sun3/dev/
H A Dfd.c1 /* $NetBSD: fd.c,v 1.71 2009/09/26 16:07:51 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.71 2009/09/26 16:07:51 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),
547 struct fd_softc *fd = device_private(self); local
552 fd->sc_dv = self;
554 callout_init(&fd
620 struct fd_softc *fd; local
629 fd_dev_to_type(struct fd_softc *fd, dev_t dev) argument
641 struct fd_softc *fd; local
714 fdstart(struct fd_softc *fd) argument
729 fdfinish(struct fd_softc *fd, struct buf *bp) argument
777 struct fd_softc *fd; local
796 struct fd_softc *fd = arg; local
808 struct fd_softc *fd = arg; local
864 struct fd_softc *fd; local
909 struct fd_softc *fd = device_lookup_private(&fd_cd, FDUNIT(dev)); local
1018 struct fd_softc *fd = TAILQ_FIRST(&fdc->sc_drives); local
1144 struct fd_softc *fd; local
1526 struct fd_softc *fd; local
1573 struct fd_softc *fd = device_lookup_private(&fd_cd, FDUNIT(dev)); local
1809 struct fd_softc *fd = device_lookup_private(&fd_cd, FDUNIT(dev)); local
1853 struct fd_softc *fd = device_lookup_private(&fd_cd, unit); local
1929 struct fd_softc *fd; local
1961 struct fd_softc *fd; local
[all...]
/netbsd-6-1-5-RELEASE/sys/dev/isa/
H A Dfd.c1 /* $NetBSD: fd.c,v 1.99 2010/11/13 13:52:03 uebayasi Exp $ */
63 * @(#)fd.c 7.4 (Berkeley) 5/25/91
67 * Floppy formatting facilities merged from FreeBSD fd.c driver:
68 * Id: fd.c,v 1.53 1995/03/12 22:40:56 joerg Exp
84 __KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.99 2010/11/13 13:52:03 uebayasi Exp $");
215 CFATTACH_DECL_NEW(fd, sizeof(struct fd_softc),
252 void fdfinish(struct fd_softc *fd, struct buf *bp);
255 static void fd_set_properties(struct fd_softc *fd);
300 struct fd_softc *fd; local
306 if ((fd
319 struct fd_softc *fd = device_private(child); local
536 struct fd_softc *fd = device_private(self); local
584 struct fd_softc *fd = device_private(self); local
666 fd_dev_to_type(struct fd_softc *fd, dev_t dev) argument
678 struct fd_softc *fd = device_lookup_private(&fd_cd, FDUNIT(bp->b_dev)); local
745 fdstart(struct fd_softc *fd) argument
761 fdfinish(struct fd_softc *fd, struct buf *bp) argument
808 struct fd_softc *fd; local
827 struct fd_softc *fd = arg; local
841 struct fd_softc *fd = arg; local
900 struct fd_softc *fd; local
928 struct fd_softc *fd = local
1007 struct fd_softc *fd = TAILQ_FIRST(&fdc->sc_drives); local
1029 struct fd_softc *fd; local
1338 struct fd_softc *fd; local
1379 struct fd_softc *fd = local
1593 struct fd_softc *fd = local
1654 fd_set_properties(struct fd_softc *fd) argument
[all...]
/netbsd-6-1-5-RELEASE/crypto/external/bsd/openssl/dist/engines/vendor_defns/
H A Dhw_ubsec.h57 typedef int t_UBSEC_ubsec_close(int fd);
59 typedef int t_UBSEC_diffie_hellman_generate_ioctl (int fd,
64 typedef int t_UBSEC_diffie_hellman_agree_ioctl (int fd,
68 typedef int t_UBSEC_rsa_mod_exp_ioctl (int fd,
72 typedef int t_UBSEC_rsa_mod_exp_crt_ioctl (int fd,
78 typedef int t_UBSEC_dsa_sign_ioctl (int fd,
85 typedef int t_UBSEC_dsa_verify_ioctl (int fd,
92 typedef int t_UBSEC_math_accelerate_ioctl(int fd, ubsec_MathCommand_t command,
97 typedef int t_UBSEC_rng_ioctl(int fd, ubsec_RNGCommand_t command,
100 typedef int t_UBSEC_max_key_len_ioctl(int fd, in
[all...]
/netbsd-6-1-5-RELEASE/external/gpl3/gcc/dist/libssp/
H A Dssp.c73 int fd; local
78 fd = open ("/dev/urandom", O_RDONLY);
79 if (fd != -1)
81 ssize_t size = read (fd, &__stack_chk_guard,
83 close (fd);
104 int fd; local
108 fd = open (_PATH_TTY, O_WRONLY);
109 if (fd != -1)
127 ssize_t wrote = write (fd, buf, len);
133 close (fd);
[all...]
/netbsd-6-1-5-RELEASE/external/ibm-public/postfix/dist/src/util/
H A Dunix_pass_trigger.c66 int fd; member in struct:unix_pass_trigger
83 event_disable_readwrite(up->fd);
86 if (close(up->fd) < 0)
103 int fd; local
111 if ((fd = unix_pass_connect(service, BLOCKING, timeout)) < 0) {
116 close_on_exec(fd, CLOSE_ON_EXEC);
125 if (unix_send_fd(fd, pair[0]) < 0)
132 up->fd = fd;
150 event_enable_read(fd, unix_pass_trigger_even
[all...]
/netbsd-6-1-5-RELEASE/usr.sbin/sesd/srcs/
H A Dchpmon.c58 int fd, delay, dev; local
76 fd = open(v[dev], O_RDWR);
77 if (fd < 0) {
86 if (ioctl(fd, SESIOC_SETENCSTAT, (caddr_t) &stat) < 0) {
89 (void) close(fd);
95 if (ioctl(fd, SESIOC_GETENCSTAT, (caddr_t) &stat) < 0) {
98 (void) close(fd);
108 (void) close(fd);
123 if (ioctl(fd, SESIOC_SETENCSTAT, (caddr_t) &stat) < 0) {
127 (void) close(fd);
[all...]
/netbsd-6-1-5-RELEASE/tests/dev/dm/
H A Dh_dm.c58 int fd; local
70 fd = rump_sys_open("/dev/mapper/control", O_RDWR, 0);
71 if (fd == -1)
79 error = rump_sys_ioctl(fd, NETBSD_DM_IOCTL, &prefp);
87 rump_sys_close(fd);
97 int fd; local
109 fd = rump_sys_open("/dev/mapper/control", O_RDWR, 0);
110 if (fd == -1)
118 error = rump_sys_ioctl(fd, NETBSD_DM_IOCTL, &prefp);
126 rump_sys_close(fd);
[all...]
/netbsd-6-1-5-RELEASE/tests/fs/puffs/
H A Dt_basic.c90 int fd, rv; local
94 fd = rump_sys_open(FSTEST_MNTNAME, O_RDWR);
95 if (fd == -1)
97 if (rump_sys_write(fd, &fd, sizeof(fd)) != sizeof(fd))
102 rump_sys_close(fd);
149 int fd = (int)(uintptr_t)arg; local
154 if (rump_sys_write(fd, bu
166 int fd; local
199 int fd; local
233 int fd; local
270 int fd; local
310 int fd; local
361 int fd, ianow; local
[all...]
/netbsd-6-1-5-RELEASE/gnu/dist/gcc4/gcc/testsuite/lib/
H A Dscandump.exp48 set fd [open $output_file r]
49 set text [read $fd]
50 close $fd
84 set fd [open $output_file r]
85 set text [read $fd]
86 close $fd
119 set fd [open $output_file r]
120 set text [read $fd]
121 close $fd
164 set fd [ope
[all...]
/netbsd-6-1-5-RELEASE/lib/lua/gpio/
H A Dgpio.c70 int *fd; local
72 fd = lua_newuserdata(L, sizeof(int));
73 *fd = open(luaL_checkstring(L, -2), O_RDWR);
74 if (*fd == -1) {
87 int *fd; local
89 fd = luaL_checkudata(L, 1, GPIO_METATABLE);
90 if (*fd != -1) {
91 close(*fd);
92 *fd = -1;
101 int *fd; local
130 int *fd; local
145 int *fd; local
159 int *fd; local
175 int *fd, val; local
194 int *fd; local
209 int *fd; local
[all...]
/netbsd-6-1-5-RELEASE/external/bsd/am-utils/dist/conf/mtab/
H A Dmtab_isc3.c52 /* fd for /etc/.mnt.lock (also act as flag for: is_locked) */
69 lockfile(int fd, int type) argument
78 return fcntl(fd, F_SETLKW, &lk);
169 int fd; local
177 fd = open(mnttabname, O_RDONLY);
178 if (fd < 0) {
183 while ((ret = read(fd, (char *) mountbuffer, NMOUNT * sizeof(mntent_t))) > 0) {
209 close(fd);
215 write_mntent_to_mtab(int fd, mntent_t *mnt) argument
220 wr = write(fd, (cha
238 int fd; local
261 int fd; local
[all...]
/netbsd-6-1-5-RELEASE/sys/arch/newsmips/stand/boot/
H A Ddevopen.c75 int fd; local
85 fd = apcall_open(romdev.devname, 2);
87 fd = rom_open(romdev.devname, 2);
89 DPRINTF("devname = %s, fd = %d\n", romdev.devname, fd);
90 if (fd == -1)
93 romdev.fd = fd;
140 apcall_close(dev->fd);
142 rom_close(dev->fd);
[all...]
/netbsd-6-1-5-RELEASE/regress/sys/kern/select/
H A Dselect.c63 int fd; local
67 fd = fds[i][1];
69 printf("[%p] write %d\n", (void *)pthread_self(), fd);
71 if (write(fd, buf, sizeof(buf)) == -1) {
90 int fd; local
96 fd = fds[i][0];
97 if (fd > FD_SETSIZE) {
99 "fd(%d) > FD_SETSIZE(%d)\n",
100 fd, FD_SETSIZE);
104 assert(!FD_ISSET(fd,
[all...]
/netbsd-6-1-5-RELEASE/sbin/dump/
H A Dsnapshot.c59 int i, n, fd, israw, fsinternal, dounlink; local
68 fd = -1;
113 fd = mkstemp(path);
117 fd = open(fss.fss_bstore, O_RDWR);
122 fd = open(fss.fss_bstore, O_CREAT|O_EXCL|O_WRONLY, 0600);
125 if (fd < 0)
128 if (fstat(fd, &sb) < 0)
140 if (ftruncate(fd, (off_t)fsb.f_frsize*fsb.f_bavail) < 0)
144 if (close(fd) < 0)
155 if ((fd
[all...]
/netbsd-6-1-5-RELEASE/usr.sbin/tpctl/
H A Dtp.c50 tp_init(struct tp *tp, int fd) argument
58 if (ioctl(fd, WSMOUSEIO_SETVERSION, &version) == -1) {
63 tp->fd = fd;
66 if (ioctl(tp->fd, WSMOUSEIO_GTYPE, &type) < 0)
73 if (ioctl(tp->fd, WSMOUSEIO_GCALIBCOORDS, &calibcoords) < 0)
76 flags = fcntl(tp->fd, F_GETFL);
80 if (fcntl(tp->fd, F_SETFL, flags) < 0)
84 if (ioctl(tp->fd, WSMOUSEIO_GETID, &id) == 0) {
103 return ioctl(tp->fd, WSMOUSEIO_SCALIBCOORD
[all...]
/netbsd-6-1-5-RELEASE/sys/external/bsd/drm/dist/tests/
H A Dgem_mmap.c41 int do_read(int fd, int handle, void *buf, int offset, int size) argument
56 return ioctl(fd, DRM_IOCTL_I915_GEM_PREAD, &read);
59 int do_write(int fd, int handle, void *buf, int offset, int size) argument
69 return ioctl(fd, DRM_IOCTL_I915_GEM_PWRITE, &write);
74 int fd; local
84 fd = drm_open_matching("8086:*", 0);
85 if (fd < 0) {
95 ret = ioctl(fd, DRM_IOCTL_I915_GEM_MMAP, &mmap);
100 ret = ioctl(fd, DRM_IOCTL_I915_GEM_CREATE, &create);
108 ret = ioctl(fd, DRM_IOCTL_I915_GEM_MMA
[all...]
H A Dgem_readwrite.c41 int do_read(int fd, int handle, void *buf, int offset, int size) argument
56 return ioctl(fd, DRM_IOCTL_I915_GEM_PREAD, &read);
59 int do_write(int fd, int handle, void *buf, int offset, int size) argument
69 return ioctl(fd, DRM_IOCTL_I915_GEM_PWRITE, &write);
74 int fd; local
81 fd = drm_open_matching("8086:*", 0);
82 if (fd < 0) {
89 ret = ioctl(fd, DRM_IOCTL_I915_GEM_CREATE, &create);
94 ret = do_read(fd, handle, buf, 0, OBJECT_SIZE);
100 ret = do_read(fd, handl
[all...]
/netbsd-6-1-5-RELEASE/tests/fs/ffs/
H A Dh_quota2_tests.c35 int fd; local
61 fd = rump_sys_open("test_fillup", O_CREAT | O_RDWR, 0644);
62 if (fd < 0) {
66 while (rump_sys_write(fd, buf, sizeof(buf)) == sizeof(buf))
70 rump_sys_close(fd);
80 int fd; local
94 fd = rump_sys_open("test_fillup", O_CREAT | O_RDWR, 0644);
95 if (fd < 0) {
107 error = rump_sys_write(fd, buf, sizeof(buf));
113 if (rump_sys_write(fd, bu
128 int fd; local
165 int fd; local
213 int fd, fssfd; local
280 int fd; local
[all...]
/netbsd-6-1-5-RELEASE/external/gpl3/gdb/dist/gdb/gdbserver/
H A Devent-loop.c67 gdb_fildes_t fd; member in struct:gdb_event
79 gdb_fildes_t fd; member in struct:file_handler
87 /* Procedure to call when fd is ready. */
93 /* Was an error detected on this fd? */
125 in, for each fd. */
139 /* Number of valid bits (highest fd value + 1). (for select) */
205 gdb_fildes_t fd; local
217 fd = event_ptr->fd;
244 if ((*proc) (fd))
335 create_file_handler(gdb_fildes_t fd, int mask, handler_func *proc, gdb_client_data client_data) argument
385 add_file_handler(gdb_fildes_t fd, handler_func *proc, gdb_client_data client_data) argument
395 delete_file_handler(gdb_fildes_t fd) argument
506 create_file_event(gdb_fildes_t fd) argument
[all...]
/netbsd-6-1-5-RELEASE/lib/librumphijack/
H A Dhijack.c297 isdup2d(int fd) argument
300 return fd <= DUP2HIGH && fd >= 0 && dup2vec[fd] & DUP2BIT;
380 whichfd(int fd) argument
383 if (fd == -1)
385 else if (fd_isrump(fd))
410 DPRINTF(("%s -> %d (%s)\n", __STRING(name), fd, whichfd(fd))); \
411 if (fd_isrump(fd)) { \
812 fd_rump2host(int fd) argument
821 fd_rump2host_withdup(int fd) argument
835 fd_host2rump(int fd) argument
845 fd_isrump(int fd) argument
932 fd_host2host(int fd) argument
960 int fd; local
1010 fchdir(int fd) argument
1117 int fd; local
1141 int fd; local
1168 ioctl(int fd, unsigned long cmd, ...) argument
1189 fcntl(int fd, int cmd, ...) argument
1285 close(int fd) argument
1323 write(int fd, const void *buf, size_t blen) argument
1719 int fd; local
1876 mmap(void *addr, size_t len, int prot, int flags, int fd, off_t offset) argument
[all...]
/netbsd-6-1-5-RELEASE/crypto/external/cpl/trousers/dist/src/tspi/ps/
H A Dtspps.c172 get_file(int *fd) argument
188 *fd = user_ps_fd;
216 *fd = user_ps_fd;
222 put_file(int fd) argument
226 fsync(fd);
230 if ((rc = fcntl(fd, F_SETLKW, &fl))) {
240 psfile_close(int fd) argument
242 close(fd);
248 psfile_is_key_registered(int fd, TSS_UUID *uuid, TSS_BOOL *answer) argument
253 if ((result = psfile_get_cache_entry_by_uuid(fd, uui
264 psfile_get_parent_uuid_by_uuid(int fd, TSS_UUID *uuid, TSS_UUID *ret_uuid) argument
278 psfile_get_parent_ps_type(int fd, TSS_UUID *uuid, UINT32 *type) argument
298 psfile_get_key_by_uuid(int fd, TSS_UUID *uuid, BYTE *key) argument
336 psfile_get_key_by_pub(int fd, TSS_UUID *uuid, UINT32 pub_size, BYTE *pub, BYTE *key) argument
374 psfile_get_uuid_by_pub(int fd, UINT32 pub_size, BYTE *pub, TSS_UUID *uuid) argument
388 psfile_change_num_keys(int fd, BYTE increment) argument
429 psfile_write_key_header(int fd) argument
482 psfile_write_key(int fd, TSS_UUID *uuid, TSS_UUID *parent_uuid, UINT32 parent_ps, BYTE *key_blob, UINT16 key_blob_size) argument
592 psfile_remove_key(int fd, TSS_UUID *uuid) argument
680 psfile_get_all_cache_entries(int fd, UINT32 *size, struct key_disk_cache **c) argument
790 copy_key_info(int fd, TSS_KM_KEYINFO *ki, struct key_disk_cache *c) argument
833 copy_key_info2(int fd, TSS_KM_KEYINFO2 *ki, struct key_disk_cache *c) argument
883 psfile_get_registered_keys(int fd, TSS_UUID *uuid, TSS_UUID *tcs_uuid, UINT32 *size, TSS_KM_KEYINFO **keys) argument
970 psfile_get_registered_keys2(int fd, TSS_UUID *uuid, TSS_UUID *tcs_uuid, UINT32 *size, TSS_KM_KEYINFO2 **keys) argument
1063 psfile_get_num_keys(int fd) argument
1108 psfile_get_cache_entry_by_uuid(int fd, TSS_UUID *uuid, struct key_disk_cache *c) argument
1209 psfile_get_cache_entry_by_pub(int fd, UINT32 pub_size, BYTE *pub, struct key_disk_cache *c) argument
[all...]
/netbsd-6-1-5-RELEASE/dist/ipf/ipsend/
H A Dslinux.c52 int fd; local
55 if ((fd = socket(AF_INET, SOCK_PACKET, htons(ETHERTYPE_IP))) == -1)
61 return fd;
66 * output an IP packet onto a fd opened for /dev/nit
68 int sendip(fd, pkt, len)
69 int fd, len;
76 if (ioctl(fd, SIOCGIFHWADDR, &ifr) == -1)
85 if (sendto(fd, pkt, len, 0, &s, sizeof(s)) == -1)
H A Dsockraw.c41 int fd; local
46 if ((fd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW)) < 0)
52 if (ioctl(fd, SIOCGIFADDR, &ifr) == -1)
61 if (bind(fd, &s, sizeof(s)) == -1)
63 return fd;
70 int sendip(int fd, char *pkt, int len) argument
82 if (sendto(fd, pkt, len, 0, &sin, sizeof(sin)) == -1)

Completed in 520 milliseconds

<<11121314151617181920>>