Searched refs:fd (Results 151 - 175 of 2333) sorted by last modified time

1234567891011>>

/freebsd-11-stable/contrib/sendmail/libmilter/
H A Dlibmilter.h182 (rds).fd = (sd); \
187 (wrs).fd = (sd); \
H A Dexample.c99 int fd = -1; local
117 if ((fd = mkstemp(priv->mlfi_fname)) < 0 ||
118 (priv->mlfi_fp = fdopen(fd, "w+")) == NULL)
120 if (fd >= 0)
121 (void) close(fd);
H A Dengine.c1882 pfd.fd = sd;
H A Dcomm.c229 ** fd -- socket descriptor
241 retry_writev(fd, iov, iovcnt, timeout)
242 socket_t fd;
270 FD_WR_INIT(fd, wrs);
271 i = FD_WR_READY(fd, wrs, timeout);
280 n = writev(fd, iov, iovcnt);
/freebsd-11-stable/contrib/sendmail/include/libsmdb/
H A Dsmdb.h84 ** fd -- A pointer to store the returned fd in.
91 typedef int (*db_fd_func) __P((SMDB_DATABASE *db, int* fd));
/freebsd-11-stable/sbin/newfs_msdos/
H A Dmkfs_msdos.c252 int fd, fd1, rv; local
258 fd = fd1 = -1;
273 fd = open(fname, O_RDWR | O_CREAT | O_TRUNC, 0644);
274 if (fd == -1) {
278 if (ftruncate(fd, o.create_size)) {
282 } else if ((fd = open(fname, o.no_create ? O_RDONLY : O_RDWR)) == -1) {
286 if (fstat(fd, &sb)) {
300 if (o.offset && o.offset != lseek(fd, o.offset, SEEK_SET)) {
325 if (getdiskinfo(fd, fname, dtype, o.hidden_sectors_set, &bpb) == -1)
754 n = write(fd, physbu
883 getdiskinfo(int fd, const char *fname, const char *dtype, __unused int oflag, struct bpb *bpb) argument
[all...]
/freebsd-11-stable/usr.bin/mkimg/
H A Dvhdx.c222 vhdx_write_and_pad(int fd, const void *data, size_t data_size, size_t align) argument
226 if (sparse_write(fd, data, data_size) < 0)
233 return image_copyout_zeroes(fd, pad_size);
237 vhdx_write_headers(int fd) argument
253 error = vhdx_write_and_pad(fd, &header, sizeof(header), SIZE_64KB);
262 return vhdx_write_and_pad(fd, &header, sizeof(header), SIZE_64KB);
266 vhdx_write_region_tables(int fd) argument
302 if (sparse_write(fd, region_table, SIZE_64KB) < 0) {
309 if (sparse_write(fd, region_table, SIZE_64KB) < 0) {
320 vhdx_write_metadata(int fd, uint64_ argument
406 vhdx_write_bat(int fd, uint64_t image_size) argument
481 vhdx_write(int fd) argument
[all...]
/freebsd-11-stable/sys/ofed/drivers/infiniband/core/
H A Dib_uverbs_main.c459 static int ib_uverbs_event_fasync(int fd, struct file *filp, int on) argument
463 return fasync_helper(fd, filp, on, &file->async_queue);
708 struct ib_uverbs_event_file *ib_uverbs_lookup_comp_file(int fd) argument
711 struct fd f = fdget(fd);
H A Dib_ucma.c1521 struct fd f;
1528 /* Get current fd to protect against it being closed */
1529 f = fdget(cmd.fd);
1533 /* Validate current fd and prevent destruction of id. */
1547 * Migrate events between fd's, maintaining order, and avoiding new
/freebsd-11-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/
H A Dzfs_ioctl.c4572 int fd; local
4600 fd = zc->zc_cookie;
4602 fp = getf(fd);
4604 fget_read(curthread, fd, cap_rights_init(&rights, CAP_PREAD), &fp);
4794 releasef(fd);
5713 * (optional) "cleanup_fd" -> fd (int32)
5908 * "fd" -> file descriptor to write stream to (int32)
5931 int fd; local
5938 error = nvlist_lookup_int32(innvl, "fd", &fd);
[all...]
/freebsd-11-stable/crypto/openssh/
H A Dauth2.c111 int fd; local
113 if ((fd = open(options.banner, O_RDONLY)) == -1)
115 if (fstat(fd, &st) == -1) {
116 close(fd);
120 close(fd);
126 n = atomicio(read, fd, banner, len);
127 close(fd);
/freebsd-11-stable/contrib/file/src/
H A Dreadelf.c349 dophn_core(struct magic_set *ms, int clazz, int swap, int fd, off_t off, argument
378 if (pread(fd, xph_addr, xph_sizeof, off) <
398 if ((bufsize = pread(fd, nbuf, len, xph_offset)) == -1) {
407 clazz, swap, 4, flags, notecount, fd, ph_off,
931 get_offset_from_virtaddr(struct magic_set *ms, int swap, int clazz, int fd, argument
942 if (pread(fd, xph_addr, xph_sizeof, off) <
962 int swap, int clazz, int fd, off_t ph_off, int ph_num,
971 offset = get_offset_from_virtaddr(ms, swap, clazz, fd, ph_off, ph_num,
974 (buflen = pread(fd, buf, CAST(size_t, buflen), offset)) <= 0) {
999 int fd, off_
961 get_string_on_virtaddr(struct magic_set *ms, int swap, int clazz, int fd, off_t ph_off, int ph_num, off_t fsize, uint64_t virtaddr, char *buf, ssize_t buflen) argument
994 do_auxv_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type, int swap, uint32_t namesz __attribute__((__unused__)), uint32_t descsz __attribute__((__unused__)), size_t noff __attribute__((__unused__)), size_t doff, int *flags, size_t size __attribute__((__unused__)), int clazz, int fd, off_t ph_off, int ph_num, off_t fsize) argument
1133 donote(struct magic_set *ms, void *vbuf, size_t offset, size_t size, int clazz, int swap, size_t align, int *flags, uint16_t *notecount, int fd, off_t ph_off, int ph_num, off_t fsize) argument
1328 doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num, size_t size, off_t fsize, int mach, int strtab, int *flags, uint16_t *notecount) argument
1616 dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num, size_t size, off_t fsize, int sh_num, int *flags, uint16_t *notecount) argument
1762 int fd = b->fd; local
[all...]
H A Dmagic.c345 close_and_restore(const struct magic_set *ms, const char *name, int fd, argument
348 if (fd == STDIN_FILENO || name == NULL)
350 (void) close(fd);
383 magic_descriptor(struct magic_set *ms, int fd) argument
387 return file_or_fd(ms, NULL, fd);
402 file_or_fd(struct magic_set *ms, const char *inname, int fd) argument
435 if (fd == STDIN_FILENO)
441 if ((fd = open(inname, flags)) < 0) {
465 if (fd != -1) {
466 okstat = fstat(fd,
[all...]
H A Dis_json.c447 int fd, rv; local
452 if ((fd = open(argv[1], O_RDONLY)) == -1)
455 if (fstat(fd, &st) == -1)
461 if (read(fd, p, st.st_size) != st.st_size)
H A Dfuncs.c296 file_buffer(struct magic_set *ms, int fd, struct stat *st, argument
308 buffer_init(&b, fd, st, buf, nb);
394 if ((ms->flags & MAGIC_NO_CHECK_ELF) == 0 && nb > 5 && fd != -1) {
H A Dfile.h163 int fd; member in struct:buffer
H A Dder.c430 int fd; local
435 if ((fd = open(argv[1], O_RDONLY)) == -1)
437 if (fstat(fd, &st) == -1)
440 if ((p = mmap(NULL, l, PROT_READ, MAP_FILE, fd, 0)) == MAP_FAILED)
H A Dcompress.c254 int fd = b->fd; local
287 urv = uncompressbuf(fd, ms->bytes_max, i, buf, &newbuf, &nsz);
355 swrite(int fd, const void *buf, size_t n) argument
361 switch (rv = write(fd, buf, n)) {
380 sread(int fd, void *buf, size_t n, int canbepipe __attribute__((__unused__))) argument
388 if (fd == STDIN_FILENO)
392 if (canbepipe && (ioctl(fd, FIONREAD, &t) == -1 || t == 0)) {
401 FD_SET(fd, &check);
407 selrv = select(fd
445 file_pipe2file(struct magic_set *ms, int fd, const void *startbuf, size_t nbytes) argument
705 closefd(int *fd, size_t i) argument
714 closep(int *fd) argument
722 copydesc(int i, int fd) argument
734 writechild(int fd, const void *old, size_t n) argument
811 uncompressbuf(int fd, size_t bytes_max, size_t method, const unsigned char *old, unsigned char **newch, size_t* n) argument
[all...]
H A Dbuffer.c40 buffer_init(struct buffer *b, int fd, const struct stat *st, const void *data, argument
43 b->fd = fd;
46 else if (b->fd == -1 || fstat(b->fd, &b->st) == -1)
78 if (pread(b->fd, b->ebuf, b->elen, b->eoff) == -1) {
H A Dascmagic.c152 buffer_init(&bb, b->fd, &b->st, utf8_buf,
/freebsd-11-stable/contrib/file/
H A Dconfigure14326 int fd, fd2;
14337 fd = creat ("conftest.mmap", 0600);
14338 if (fd < 0)
14340 if (write (fd, data, pagesize) != pagesize)
14342 close (fd);
14365 fd = open ("conftest.mmap", O_RDWR);
14366 if (fd < 0)
14369 MAP_PRIVATE | MAP_FIXED, fd, 0L))
14383 if (read (fd, data3, pagesize) != pagesize)
14388 close (fd);
[all...]
/freebsd-11-stable/contrib/ntp/ntpdate/
H A Dntpdate.c118 SOCKET fd[MAX_AF]; variable
646 close (fd);
1740 fd[nbsock] = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
1741 if (fd[nbsock] == SOCKET_ERROR) {
1756 if (setsockopt(fd[nbsock], SOL_SOCKET, SO_REUSEADDR, (void*) &optval, sizeof(optval)) < 0) {
1764 if (setsockopt(fd[nbsock], IPPROTO_IPV6, IPV6_V6ONLY, (void*) &optval, sizeof(optval)) < 0) {
1779 rc = bind(fd[nbsock], &addr.sa, SOCKLEN(&addr));
1790 fdmask[nbsock].fd = fd[nbsock];
1793 FD_SET(fd[nbsoc
[all...]
/freebsd-11-stable/contrib/ntp/ntpd/
H A Drefclock_parse.c423 int ppsfd; /* fd to ise for PPS io */
1823 msyslog(LOG_ERR, "PARSE receiver #%d: ppsclock_init: ioctl(fd, I_PUSH, \"ppsclock\"): %m",
1851 if (ioctl(parse->generic->io.fd, I_PUSH, (caddr_t)m1) == -1)
1855 msyslog(LOG_ERR, "PARSE receiver #%d: stream_init: ioctl(fd, I_PUSH, \"parse\"): %m", CLK_UNIT(parse->peer));
1861 while(ioctl(parse->generic->io.fd, I_POP, (caddr_t)0) == 0)
1868 if (ioctl(parse->generic->io.fd, I_PUSH, (caddr_t)m1) == -1)
1870 msyslog(LOG_ERR, "PARSE receiver #%d: stream_init: ioctl(fd, I_PUSH, \"parse\"): %m", CLK_UNIT(parse->peer));
1888 while(ioctl(parse->generic->io.fd, I_POP, (caddr_t)0) == 0)
1908 if (ioctl(parse->generic->io.fd, I_STR, (caddr_t)&strioc) == -1)
1910 msyslog(LOG_ERR, "PARSE receiver #%d: stream_setcs: ioctl(fd, I_ST
[all...]
H A Drefclock_palisade.c83 #define write(fd, data, octets) async_write(fd, data, octets)
195 int fd
202 result = write(fd, buffer->data, (unsigned long)buffer->size);
216 int fd
227 sendetx (&tx, fd);
232 sendetx (&tx, fd);
242 int fd
257 sendetx(&tx, fd);
267 int fd
304 int fd; local
[all...]
H A Drefclock_nmea.c245 int ppsapi_fd; /* fd used with PPSAPI */
328 # define write(fd, data, octets) async_write(fd, data, octets)
413 pp->io.fd = -1;
439 pp->io.fd = refclock_open(device, baudrate, LDISC_CLK);
440 if (0 >= pp->io.fd) {
441 pp->io.fd = nmead_open(device);
442 if (-1 == pp->io.fd)
475 if (up->ppsapi_tried && up->ppsapi_fd != pp->io.fd)
481 if (-1 != pp->io.fd)
1182 gps_send( int fd, const char * cmd, struct peer * peer ) argument
1775 int fd = -1; /* result file descriptor */ local
[all...]

Completed in 242 milliseconds

1234567891011>>