Searched refs:fd (Results 201 - 225 of 1789) sorted by relevance

1234567891011>>

/freebsd-10.0-release/usr.bin/tee/
H A Dtee.c56 int fd; member in struct:_list
68 int n, fd, rval, wval; local
96 if ((fd = open(*argv, append ? O_WRONLY|O_CREAT|O_APPEND :
101 add(fd, *argv);
108 if ((wval = write(p->fd, bp, n)) == -1) {
129 add(int fd, const char *name) argument
135 p->fd = fd;
/freebsd-10.0-release/usr.sbin/rtadvd/
H A Dcontrol_client.c58 cm_handler_client(int fd, int state, char *buf_orig) argument
77 close(fd);
94 error = cm_send(fd, buf);
101 error = cm_recv(fd, buf);
105 close(fd);
116 close(fd);
121 close(fd);
129 close(fd);
/freebsd-10.0-release/contrib/gcc/config/
H A Dhost-hpux.c56 hpux_gt_pch_get_address (size_t size, int fd) argument
61 MAP_PRIVATE, fd, 0);
88 hpux_gt_pch_use_address (void *base, size_t size, int fd, size_t offset) argument
99 addr = mmap (base, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, offset);
118 if (lseek (fd, offset, SEEK_SET) == (off_t)-1)
125 nbytes = read (fd, base, MIN (size, SSIZE_MAX));
/freebsd-10.0-release/contrib/sendmail/test/
H A Dt_pathconf.c37 int fd; local
49 fd = mkstemp(tbuf);
50 if (fd < 0)
62 i = fpathconf(fd, _PC_CHOWN_RESTRICTED);
68 if (fchown(fd, 1, 1) >= 0)
77 if (fchown(fd, 1, 1) >= 0)
/freebsd-10.0-release/contrib/texinfo/info/
H A Ddoc.h80 #define DocInfoCmd(fd) ((fd) && (fd)->func ? (fd) : NULL)
85 #define DocInfoCmd(fd) ((fd)->func)
/freebsd-10.0-release/crypto/openssh/
H A Dmsg.c44 ssh_msg_send(int fd, u_char type, Buffer *m) argument
53 if (atomicio(vwrite, fd, buf, sizeof(buf)) != sizeof(buf)) {
57 if (atomicio(vwrite, fd, buffer_ptr(m), mlen) != mlen) {
65 ssh_msg_recv(int fd, Buffer *m) argument
72 if (atomicio(read, fd, buf, sizeof(buf)) != sizeof(buf)) {
84 if (atomicio(read, fd, buffer_ptr(m), msg_len) != msg_len) {
H A Dsshpty.c101 int fd; local
110 fd = open(tty, O_RDWR|O_NOCTTY);
111 if (fd != -1) {
113 ioctl(fd, TCVHUP, (char *)NULL);
116 close(fd);
123 fd = open("/dev/tty", O_RDWR);
124 if (fd < 0)
127 *ttyfd = fd;
132 fd = open(_PATH_TTY, O_RDWR | O_NOCTTY);
133 if (fd >
[all...]
H A Dmonitor_fdpass.c47 mm_send_fd(int sock, int fd) argument
65 msg.msg_accrights = (caddr_t)&fd;
66 msg.msg_accrightslen = sizeof(fd);
74 *(int *)CMSG_DATA(cmsg) = fd;
82 pfd.fd = sock;
86 debug3("%s: sendmsg(%d): %s", __func__, fd, strerror(errno));
90 error("%s: sendmsg(%d): %s", __func__, fd,
122 int fd; local
131 msg.msg_accrights = (caddr_t)&fd;
132 msg.msg_accrightslen = sizeof(fd);
[all...]
/freebsd-10.0-release/lib/libc/stdio/
H A Dtmpfile.c55 int fd, sverrno; local
74 fd = mkstemp(buf);
75 if (fd != -1)
82 if (fd == -1)
85 if ((fp = fdopen(fd, "w+")) == NULL) {
87 (void)_close(fd);
/freebsd-10.0-release/lib/libc/sys/
H A Dfcntl.c40 __fcntl_compat(int fd, int cmd, ...) argument
53 return (__sys_fcntl(fd, cmd, arg));
69 res = __sys_fcntl(fd, F_OGETLK, &ofl);
81 return (__sys_fcntl(fd, F_OSETLK, &ofl));
84 return (__sys_fcntl(fd, F_OSETLKW, &ofl));
87 return (__sys_fcntl(fd, cmd, arg));
/freebsd-10.0-release/libexec/bootpd/
H A Dgetether.c46 int fd; local
50 if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
54 if (ioctl(fd, SIOCRPHYSADDR, &phys) < 0) {
60 close(fd);
128 int fd, rc = -1;
135 fd = socket(AF_INET, SOCK_DGRAM, 0);
136 if (fd < 0) {
138 return (fd);
142 if (ioctl(fd, SIOCGIFCONF, (char *) &ifc) < 0 ||
167 close(fd);
126 int fd, rc = -1; local
196 int fd, flags; local
345 int fd; local
[all...]
/freebsd-10.0-release/sys/boot/ia64/ski/
H A Dsal_stub.c111 struct ia64_fdesc *fd; local
113 fd = (void*)PalProc;
114 sal_systab.entry.sale_pal_proc = fd->func;
115 fd = (void*)SalProc;
116 sal_systab.entry.sale_sal_proc = fd->func;
117 sal_systab.entry.sale_sal_gp = fd->gp;
/freebsd-10.0-release/usr.sbin/nandtool/
H A Dnand_readoob.c45 int fd = -1, fd_out = -1, ret = 0; local
67 if ((fd = g_open(dev, 1)) == -1) {
73 if (ioctl(fd, NAND_IO_GET_CHIP_PARAM, &chip_params) == -1) {
90 if (ioctl(fd, NAND_IO_OOB_READ, &req) == -1) {
104 if (fd != -1)
105 g_close(fd);
/freebsd-10.0-release/contrib/apr/poll/unix/
H A Dselect.c73 apr_os_sock_t fd; local
86 fd = aprset[i].desc.s->socketdes;
100 fd = aprset[i].desc.f->filedes;
108 if (fd >= FD_SETSIZE) {
114 FD_SET(fd, &readset);
117 FD_SET(fd, &writeset);
121 FD_SET(fd, &exceptset);
123 if ((int) fd > maxfd) {
124 maxfd = (int) fd;
151 apr_os_sock_t fd; local
229 apr_os_sock_t fd; local
298 apr_os_sock_t fd; local
397 apr_os_sock_t fd; local
[all...]
/freebsd-10.0-release/contrib/libarchive/libarchive/
H A Darchive_read_disk_entry_from_file.c121 struct archive_entry *, int *fd);
123 struct archive_entry *, int *fd);
125 struct archive_entry *, int *fd);
127 struct archive_entry *, int *fd);
132 int fd,
138 int initial_fd = fd;
149 if (fd >= 0) {
150 if (fstat(fd, &s) != 0) {
196 if (fd < 0) {
198 fd
130 archive_read_disk_entry_from_file(struct archive *_a, struct archive_entry *entry, int fd, const struct stat *st) argument
287 setup_mac_metadata(struct archive_read_disk *a, struct archive_entry *entry, int *fd) argument
391 setup_mac_metadata(struct archive_read_disk *a, struct archive_entry *entry, int *fd) argument
407 setup_acls(struct archive_read_disk *a, struct archive_entry *entry, int *fd) argument
657 setup_acls(struct archive_read_disk *a, struct archive_entry *entry, int *fd) argument
684 setup_xattr(struct archive_read_disk *a, struct archive_entry *entry, const char *name, int fd) argument
751 setup_xattrs(struct archive_read_disk *a, struct archive_entry *entry, int *fd) argument
859 setup_xattr(struct archive_read_disk *a, struct archive_entry *entry, int namespace, const char *name, const char *fullname, int fd) argument
909 setup_xattrs(struct archive_read_disk *a, struct archive_entry *entry, int *fd) argument
996 setup_xattrs(struct archive_read_disk *a, struct archive_entry *entry, int *fd) argument
1025 setup_sparse(struct archive_read_disk *a, struct archive_entry *entry, int *fd) argument
1118 setup_sparse(struct archive_read_disk *a, struct archive_entry *entry, int *fd) argument
1213 setup_sparse(struct archive_read_disk *a, struct archive_entry *entry, int *fd) argument
[all...]
/freebsd-10.0-release/contrib/unbound/util/
H A Dnetevent.h109 /** the comm_point with fd to send reply on to. */
146 int fd; member in struct:comm_point
347 * @param fd : file descriptor of open UDP socket.
355 int fd, ldns_buffer* buffer,
363 * @param fd : file descriptor of open UDP socket.
371 int fd, ldns_buffer* buffer,
380 * @param fd: file descriptor of open TCP socket set to listen nonblocking.
392 int fd, int num, size_t bufsize,
409 * @param fd: file descriptor of open AF_UNIX socket set to listen nonblocking.
416 int fd, size_
[all...]
/freebsd-10.0-release/bin/sh/
H A Dinput.c83 int fd; /* file descriptor (or -1 if string) */ member in struct:parsefile
173 if (parsefile->fd == 0 && el) {
194 nr = read(parsefile->fd, parsefile->buf, BUFSIZ);
200 if (parsefile->fd == 0 && errno == EWOULDBLOCK) {
291 if (parsefile->fd == 0 && hist && something) {
393 int fd; local
397 if ((fd = open(fname, O_RDONLY | O_CLOEXEC)) < 0)
399 if (fd < 10) {
400 fd2 = fcntl(fd, F_DUPFD_CLOEXEC, 10);
401 close(fd);
417 setinputfd(int fd, int push) argument
[all...]
/freebsd-10.0-release/lib/libc/gen/
H A Dpututxline.c48 int fd; local
50 fd = _open(file, O_CREAT|O_RDWR|O_EXLOCK|O_CLOEXEC, 0644);
51 if (fd < 0)
55 if (_fstat(fd, &sb) != -1 && sb.st_size % sizeof(struct futx) != 0) {
56 _close(fd);
61 fp = fdopen(fd, "r+");
63 _close(fd);
181 int fd; local
184 fd = _open(_PATH_UTX_ACTIVE, O_CREAT|O_RDWR|O_TRUNC, 0644);
185 if (fd <
239 int fd; local
259 int error, fd; local
[all...]
/freebsd-10.0-release/crypto/heimdal/lib/krb5/
H A Dfcache.c44 int fd; member in struct:fcc_cursor
72 _krb5_xlock(krb5_context context, int fd, krb5_boolean exclusive, argument
83 ret = fcntl(fd, F_SETLKW, &l);
85 ret = flock(fd, exclusive ? LOCK_EX : LOCK_SH);
116 _krb5_xunlock(krb5_context context, int fd) argument
125 ret = fcntl(fd, F_SETLKW, &l);
127 ret = flock(fd, LOCK_UN);
149 write_storage(krb5_context context, krb5_storage *sp, int fd) argument
160 sret = write(fd, data.data, data.length);
175 int fd, krb5_boolea
174 fcc_lock(krb5_context context, krb5_ccache id, int fd, krb5_boolean exclusive) argument
181 fcc_unlock(krb5_context context, int fd) argument
214 scrub_file(int fd) argument
250 int fd; local
316 int fd; local
390 int fd; local
423 int fd; local
503 int fd; local
544 int fd; local
693 int fd; local
802 int fd; local
1026 int fd; local
1053 int fd; local
1080 int fd; local
[all...]
/freebsd-10.0-release/contrib/libarchive/libarchive/test/
H A Dtest_extattr_freebsd.c51 int fd;
60 fd = open("pretest", O_RDWR | O_CREAT, 0777);
62 if (!assert(fd >= 0))
66 n = extattr_set_fd(fd, EXTATTR_NAMESPACE_USER, "testattr", "1234", 4);
68 close(fd);
74 close(fd);
78 * This should work (extattr_set_fd() should follow fd
82 fd = open("pretest2", O_RDWR | O_CREAT, 00000);
84 if (!assert(fd >= 0))
87 n = extattr_set_fd(fd, EXTATTR_NAMESPACE_USE
[all...]
/freebsd-10.0-release/sbin/clri/
H A Dclri.c82 int i, fd, inonum; local
93 if ((fd = open(fs, O_RDWR, 0)) < 0)
96 if (lseek(fd, (off_t)(sblock_try[i]), SEEK_SET) < 0)
98 if (read(fd, sblock, sizeof(sblock)) != sizeof(sblock))
125 if (lseek(fd, offset, SEEK_SET) < 0)
127 if (read(fd, ibuf, bsize) != bsize)
151 if (lseek(fd, (off_t)-bsize, SEEK_CUR) < 0)
153 if (write(fd, ibuf, bsize) != bsize)
155 (void)fsync(fd);
157 (void)close(fd);
[all...]
/freebsd-10.0-release/contrib/apr-util/test/
H A Dtestxml.c24 apr_file_t **fd)
31 rv = apr_file_mktemp(fd, template, APR_FOPEN_CREATE | APR_FOPEN_TRUNCATE | APR_FOPEN_DELONCLOSE |
39 "<had a=\"little\"/><lamb/>\n", *fd);
44 "for=\"dinner\">yummy</hmm>\n", *fd);
48 rv = apr_file_puts("</mary>\n", *fd);
51 rv = apr_file_seek(*fd, APR_SET, &off);
58 apr_file_t **fd)
65 rv = apr_file_mktemp(fd, template, APR_FOPEN_CREATE | APR_FOPEN_TRUNCATE | APR_FOPEN_DELONCLOSE |
72 rv = apr_file_puts("<?xml version=\"1.0\" ?>\n<mary>\n", *fd);
77 "for=\"dinner &lt;&gt;&#x3D;\">yummy</hmm>\n", *fd);
23 create_dummy_file_error(abts_case *tc, apr_pool_t *p, apr_file_t **fd) argument
57 create_dummy_file(abts_case *tc, apr_pool_t *p, apr_file_t **fd) argument
122 apr_file_t *fd; local
153 apr_file_t *fd; local
[all...]
/freebsd-10.0-release/usr.sbin/nandsim/
H A Dnandsim.c237 opendev(int *fd) argument
240 *fd = open(SIMDEVICE, O_RDWR);
241 if (*fd == -1) {
281 int chip = 0, ctl = 0, err = 0, fd, idx, idx2, start, stop; local
299 if (opendev(&fd) != EX_OK)
309 err = ioctl(fd, NANDSIM_STATUS_CTRL, &ctrlconf);
322 err = ioctl(fd, NANDSIM_STATUS_CHIP, &chipconf);
332 close(fd);
351 int chip = 0, ctl = 0, err = 0, fd, running, state; local
372 if (opendev(&fd) !
388 int chip = 0, ctl = 0, err = 0, fd, running; local
418 int chip, ctl, err = 0, fd = -1, i; local
520 int chip = 0, ctl = 0, err = 0, fd; local
567 int c, cdevd, chip = 0, ctl = 0, err = 0, fd, idx; local
662 int chip = 0, ctl = 0, err = 0, fd, i, start = 0, state, stop = 0; local
719 int chip = 0, ctl = 0, err = 0, fd, idx, start = 0, stop = 0; local
807 int chip = 0, ctl = 0, err = EX_OK, fd, dumpfd; local
935 int chip = 0, ctl = 0, err = 0, fd, dumpfd = -1; local
1073 int chip = 0, ctl = 0, err = 0, fd, idx, idx2, state; local
1258 int err, fd; local
1279 int err, fd; local
1301 int err, fd; local
[all...]
/freebsd-10.0-release/contrib/ipfilter/tools/
H A Dipfs.c105 int fd, olen, nlen, rw; local
120 fd = open(fname, O_RDWR);
121 if (fd == -1) {
126 for (pos = 0; read(fd, &ips, sizeof(ips)) == sizeof(ips); ) {
145 if (lseek(fd, pos, SEEK_SET) != pos) {
149 if (write(fd, &ips, sizeof(ips)) != sizeof(ips)) {
154 pos = lseek(fd, 0, SEEK_CUR);
156 close(fd);
168 int fd, olen, nlen, rw; local
185 fd
353 int fd = -1; local
795 int fd, devfd; local
846 int fd, devfd; local
[all...]
/freebsd-10.0-release/usr.sbin/mfiutil/
H A Dmfi_bbu.c106 mfi_bbu_get_props(int fd, struct mfi_bbu_properties *props, uint8_t *statusp) argument
109 return (mfi_dcmd_command(fd, MFI_DCMD_BBU_GET_PROP, props,
114 mfi_bbu_set_props(int fd, struct mfi_bbu_properties *props, uint8_t *statusp) argument
117 return (mfi_dcmd_command(fd, MFI_DCMD_BBU_SET_PROP, props,
125 int error, fd; local
135 fd = mfi_open(mfi_unit, O_RDWR);
136 if (fd < 0) {
142 if (mfi_dcmd_command(fd, MFI_DCMD_BBU_START_LEARN, NULL, 0, NULL, 0,
161 int error, fd; local
172 fd
[all...]

Completed in 155 milliseconds

1234567891011>>