Home
last modified time | relevance | path

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

1234

/components/dfs/dfs_v1/src/
A Ddfs.c227 return fd; in fd_slot_expand()
287 if (!fd) in fd_alloc()
347 if (fd < 0 || fd >= (int)fdt->maxfd) in fdt_fd_get()
392 if ((fd < 0) || (fd >= fdt->maxfd)) in fdt_fd_release()
524 if (fd == NULL || fd->vnode->fops == NULL || fd->vnode->path == NULL) continue; in fd_is_open()
637 return fd; in fd_get_fd_index_form_fdt()
682 if ((fd < 0) || (fd >= fdt->maxfd)) in fd_associate()
694 retfd = fd; in fd_associate()
706 if (fd) in fd_init()
947 if (fd && fd->vnode->fops) in list_fd()
[all …]
A Ddfs_posix.c52 if (fd < 0) in open()
71 return fd; in open()
98 int fd; in openat() local
135 return fd; in openat()
644 int fd; in mkdir() local
737 t->fd = fd; in opendir()
765 fd = fd_get(d->fd); in readdir()
813 fd = fd_get(d->fd); in telldir()
838 fd = fd_get(d->fd); in seekdir()
862 fd = fd_get(d->fd); in rewinddir()
[all …]
A Ddfs_file.c194 if (fd == NULL) in dfs_file_open()
409 return fd->vnode->fops->ioctl(fd, cmd, args); in dfs_file_ioctl()
439 if ((result = fd->vnode->fops->read(fd, buf, len)) < 0) in dfs_file_read()
471 return fd->vnode->fops->getdents(fd, dirp, nbytes); in dfs_file_getdents()
551 return fd->vnode->fops->write(fd, buf, len); in dfs_file_write()
569 return fd->vnode->fops->flush(fd); in dfs_file_flush()
590 result = fd->vnode->fops->lseek(fd, offset); in dfs_file_lseek()
769 ret = fd->vnode->fops->ioctl(fd, RT_FIOMMAP2, mmap2); in dfs_file_mmap2()
810 fd_init(&fd); in ls()
873 fd_init(&fd); in cat()
[all …]
/components/libc/posix/io/poll/
A Dselect.c50 int fd; in select() local
58 for (fd = 0, npfds = 0; fd < nfds; fd++) in select()
61 if ((readfds && FD_ISSET(fd, readfds)) || in select()
63 (exceptfds && FD_ISSET(fd, exceptfds))) in select()
80 for (fd = 0, ndx = 0; fd < nfds; fd++) in select()
91 if (readfds && FD_ISSET(fd, readfds)) in select()
93 pollset[ndx].fd = fd; in select()
98 if (writefds && FD_ISSET(fd, writefds)) in select()
100 pollset[ndx].fd = fd; in select()
105 if (exceptfds && FD_ISSET(fd, exceptfds)) in select()
[all …]
/components/dfs/dfs_v1/include/
A Ddfs_file.h25 int (*open) (struct dfs_file *fd);
26 int (*close) (struct dfs_file *fd);
27 int (*ioctl) (struct dfs_file *fd, int cmd, void *args);
30 int (*flush) (struct dfs_file *fd);
31 off_t (*lseek) (struct dfs_file *fd, off_t offset);
34 int (*poll) (struct dfs_file *fd, struct rt_pollreq *req);
87 int dfs_file_close(struct dfs_file *fd);
88 int dfs_file_ioctl(struct dfs_file *fd, int cmd, void *args);
93 int dfs_file_flush(struct dfs_file *fd);
94 off_t dfs_file_lseek(struct dfs_file *fd, off_t offset);
[all …]
A Ddfs.h100 struct dfs_file *fdt_fd_get(struct dfs_fdtable* fdt, int fd);
101 void fdt_fd_release(struct dfs_fdtable* fdt, int fd);
104 struct dfs_file *fd_get(int fd);
105 void fd_release(int fd);
107 void fd_init(struct dfs_file *fd);
108 int fd_associate(struct dfs_fdtable *fdt, int fd, struct dfs_file *file);
/components/libc/posix/io/termios/
A Dtermios.c30 int tcgetattr(int fd, struct termios *tio) in tcgetattr() argument
33 if (ioctl(fd, TCGETA, tio)) in tcgetattr()
57 int tcsetattr(int fd, int act, const struct termios *tio) in tcsetattr() argument
63 return (ioctl(fd, TCSETA, (void*)tio)); in tcsetattr()
69 return (ioctl(fd, TCSETAW, (void*)tio)); in tcsetattr()
75 return (ioctl(fd, TCSETAF, (void*)tio)); in tcsetattr()
91 pid_t tcgetsid(int fd) in tcgetsid() argument
177 int tcsendbreak(int fd, int dur) in tcsendbreak() argument
197 int tcflush(int fd, int queue) in tcflush() argument
217 int tcflow(int fd, int action) in tcflow() argument
[all …]
/components/dfs/dfs_v1/filesystems/iso9660/
A Ddfs_iso9660.c229 fd = it->fd; in iso9660_lookup()
230 iso = fd->iso; in iso9660_lookup()
238 if (!(fd = rt_malloc(sizeof(*fd)))) in iso9660_lookup()
240 return fd; in iso9660_lookup()
243 fd->iso = iso; in iso9660_lookup()
370 rt_free(fd); in iso9660_lookup()
380 fd->vnode->data = iso9660_lookup(iso, fd->vnode->path, RT_NULL); in dfs_iso9660_open()
410 if (fd->pos) in dfs_iso9660_read()
503 it.fd = iso_fd; in dfs_iso9660_getdents()
656 if (!fd) in dfs_iso9660_stat()
[all …]
/components/libc/compilers/newlib/
A Dsyscalls.c108 int _close_r(struct _reent *ptr, int fd) in _close_r() argument
111 return close(fd); in _close_r()
145 if (fd >=0 && fd < 3) in _isatty_r()
178 int flock(int fd, int operation) in flock() argument
187 rc = lseek(fd, pos, whence); in _lseek_r()
226 if (fd == STDIN_FILENO) in _read_r()
240 else if (fd == STDOUT_FILENO || fd == STDERR_FILENO) in _read_r()
246 rc = read(fd, buf, nbytes); in _read_r()
298 if (fd == STDOUT_FILENO || fd == STDERR_FILENO) in _write_r()
311 else if (fd == STDIN_FILENO) in _write_r()
[all …]
/components/lwp/
A Dlwp_ipc.c425 int fd; in _ipc_msg_fd_new() local
437 if (fd < 0) in _ipc_msg_fd_new()
468 return fd; in _ipc_msg_fd_new()
525 data->u.fd.file = _ipc_msg_get_file(data->u.fd.fd); in _do_send_recv_timeout()
851 data->u.fd.fd = _ipc_msg_fd_new(data->u.fd.file); in _rt_raw_channel_recv_timeout()
902 data->u.fd.fd = _ipc_msg_fd_new(data->u.fd.file); in _rt_raw_channel_recv_timeout()
984 int fd; in _chfd_alloc() local
989 if (fd < 0) in _chfd_alloc()
993 return fd; in _chfd_alloc()
1080 int fd; in lwp_channel_open() local
[all …]
A Dlwp_ipc.h39 int fd; member
40 } fd; member
47 rt_err_t rt_channel_close(int fd);
48 rt_err_t rt_channel_send(int fd, rt_channel_msg_t data);
49 rt_err_t rt_channel_send_recv(int fd, rt_channel_msg_t data, rt_channel_msg_t data_ret);
50 rt_err_t rt_channel_send_recv_timeout(int fd, rt_channel_msg_t data, rt_channel_msg_t data_ret, rt_…
51 rt_err_t rt_channel_reply(int fd, rt_channel_msg_t data);
52 rt_err_t rt_channel_recv(int fd, rt_channel_msg_t data);
53 rt_err_t rt_channel_recv_timeout(int fd, rt_channel_msg_t data, rt_int32_t time);
54 rt_err_t rt_channel_peek(int fd, rt_channel_msg_t data);
/components/dfs/dfs_v2/src/
A Ddfs_posix.c50 int fd, result; in open() local
68 fd = fd_new(); in open()
69 if (fd >= 0) in open()
87 return fd; in open()
114 int fd; in openat() local
151 return fd; in openat()
284 int close(int fd) in close() argument
305 fd_release(fd); in close()
940 fd = fd_new(); in opendir()
941 if (fd >= 0) in opendir()
[all …]
/components/dfs/dfs_v1/filesystems/elmfat/
A Ddfs_elm.c333 FIL *fd; in dfs_elm_open() local
429 if (fd == RT_NULL) in dfs_elm_open()
451 f_lseek(fd, f_size(fd)); in dfs_elm_open()
458 rt_free(fd); in dfs_elm_open()
495 rt_free(fd); in dfs_elm_close()
507 FIL *fd; in dfs_elm_ioctl() local
539 FIL *fd; in dfs_elm_read() local
562 FIL *fd; in dfs_elm_write() local
586 FIL *fd; in dfs_elm_flush() local
592 result = f_sync(fd); in dfs_elm_flush()
[all …]
/components/legacy/fdt/src/
A Ddtb_load.c22 int fd = -1; in dtb_node_load_from_fs() local
30 fd = open(dtb_filename, O_RDONLY, 0); in dtb_node_load_from_fs()
32 if (fd == -1) in dtb_node_load_from_fs()
39 dtb_sz = lseek(fd, 0, SEEK_END); in dtb_node_load_from_fs()
49 lseek(fd, 0, SEEK_SET); in dtb_node_load_from_fs()
50 read(fd, fdt, sizeof(uint8_t) * dtb_sz); in dtb_node_load_from_fs()
60 if (fd != -1) in dtb_node_load_from_fs()
62 close(fd); in dtb_node_load_from_fs()
/components/drivers/ipc/
A Dpipe.c64 pipe = (rt_pipe_t *)fd->vnode->data; in pipe_fops_open()
81 if (fd->vnode->ref_count == 1) in pipe_fops_open()
126 pipe = (rt_pipe_t *)fd->vnode->data; in pipe_fops_close()
149 if (fd->vnode->ref_count == 1) in pipe_fops_close()
191 pipe = (rt_pipe_t *)fd->vnode->data; in pipe_fops_ioctl()
231 pipe = (rt_pipe_t *)fd->vnode->data; in pipe_fops_read()
246 if (fd->flags & O_NONBLOCK) in pipe_fops_read()
293 pipe = (rt_pipe_t *)fd->vnode->data; in pipe_fops_write()
316 if (fd->flags & O_NONBLOCK) in pipe_fops_write()
362 pipe = (rt_pipe_t *)fd->vnode->data; in pipe_fops_poll()
[all …]
/components/libc/posix/io/epoll/
A Depoll.c327 df = fd_get(fd); in epoll_epf_init()
347 ep->fdlist->fd = fd; in epoll_epf_init()
390 int fd; in epoll_do_create() local
444 if (fdlist->next->fd == fd) in epoll_ctl_add()
456 fdlist->fd = fd; in epoll_ctl_add()
510 if (rdlist->fd == fd) in epoll_ctl_del()
518 if (fdlist->next->fd == fd) in epoll_ctl_del()
568 if (fdlist->next->fd == fd) in epoll_ctl_mod()
741 int fd = 0; in epoll_get_event() local
743 fd = fl->fd; in epoll_get_event()
[all …]
/components/net/lwip/lwip-1.4.1/src/include/lwip/
A Dsio.h72 void sio_send(u8_t c, sio_fd_t fd);
83 u8_t sio_recv(sio_fd_t fd);
98 u32_t sio_read(sio_fd_t fd, u8_t *data, u32_t len);
111 u32_t sio_tryread(sio_fd_t fd, u8_t *data, u32_t len);
125 u32_t sio_write(sio_fd_t fd, u8_t *data, u32_t len);
134 void sio_read_abort(sio_fd_t fd);
/components/net/lwip/lwip-2.1.2/src/include/lwip/
A Dsio.h73 void sio_send(u8_t c, sio_fd_t fd);
84 u8_t sio_recv(sio_fd_t fd);
99 u32_t sio_read(sio_fd_t fd, u8_t *data, u32_t len);
112 u32_t sio_tryread(sio_fd_t fd, u8_t *data, u32_t len);
126 u32_t sio_write(sio_fd_t fd, u8_t *data, u32_t len);
135 void sio_read_abort(sio_fd_t fd);
/components/net/lwip/lwip-2.0.3/src/include/lwip/
A Dsio.h73 void sio_send(u8_t c, sio_fd_t fd);
84 u8_t sio_recv(sio_fd_t fd);
99 u32_t sio_read(sio_fd_t fd, u8_t *data, u32_t len);
112 u32_t sio_tryread(sio_fd_t fd, u8_t *data, u32_t len);
126 u32_t sio_write(sio_fd_t fd, u8_t *data, u32_t len);
135 void sio_read_abort(sio_fd_t fd);
/components/utilities/ymodem/
A Dry_sy.c28 int fd; member
64 if (cctx->fd < 0) in _rym_recv_begin()
84 RT_ASSERT(cctx->fd >= 0); in _rym_recv_data()
106 RT_ASSERT(cctx->fd >= 0); in _rym_recv_end()
107 close(cctx->fd); in _rym_recv_end()
108 cctx->fd = -1; in _rym_recv_end()
124 if (cctx->fd < 0) in _rym_send_begin()
190 close(cctx->fd); in _rym_send_end()
191 cctx->fd = -1; in _rym_send_end()
206 ctx->fd = -1; in rym_download_file()
[all …]
/components/net/lwip/lwip-2.0.3/src/apps/tftp/
A Dtftp_port.c22 int fd = -1; in tftp_open() local
28 fd = open(fname, O_WRONLY | O_CREAT, 0); in tftp_open()
32 fd = open(fname, O_RDONLY, 0); in tftp_open()
40 return (void *) fd; in tftp_open()
45 int fd = (int) handle; in tftp_write() local
47 return write(fd, p->payload, p->len); in tftp_write()
/components/net/lwip/lwip-2.1.2/src/apps/tftp/
A Dtftp_port.c22 int fd = -1; in tftp_open() local
28 fd = open(fname, O_WRONLY | O_CREAT, 0); in tftp_open()
32 fd = open(fname, O_RDONLY, 0); in tftp_open()
40 return (void *) fd; in tftp_open()
45 int fd = (int) handle; in tftp_write() local
47 return write(fd, p->payload, p->len); in tftp_write()
/components/dfs/dfs_v2/filesystems/elmfat/
A Ddfs_elm.c372 FIL *fd; in dfs_elm_open() local
493 f_lseek(fd, f_size(fd)); in dfs_elm_open()
535 f_close(fd); in dfs_elm_close()
537 rt_free(fd); in dfs_elm_close()
565 FIL *fd; in dfs_elm_read() local
593 FIL *fd; in dfs_elm_write() local
608 *pos = fd->fptr; in dfs_elm_write()
619 FIL *fd; in dfs_elm_flush() local
652 FIL *fd; in dfs_elm_lseek() local
688 FIL *fd; in dfs_elm_truncate() local
[all …]
/components/libc/posix/io/stdio/
A Dstdio.c34 int fd = rt_posix_stdio_set_console(dev_console->parent.name, O_RDWR); in rt_posix_stdio_init() local
35 if (fd < 0) in rt_posix_stdio_init()
40 sys_dup2(fd, 0); in rt_posix_stdio_init()
41 sys_dup2(fd, 1); in rt_posix_stdio_init()
42 sys_dup2(fd, 2); in rt_posix_stdio_init()
158 int fd = fileno(std_console); in rt_posix_stdio_set_console() local
160 return fd; in rt_posix_stdio_set_console()
182 int fd; in rt_posix_stdio_set_console() local
188 fd = open(name, mode, 0); in rt_posix_stdio_set_console()
189 if (fd >= 0) in rt_posix_stdio_set_console()
[all …]
/components/dfs/dfs_v2/include/
A Ddfs.h125 int dfs_fdtable_drop_fd(struct dfs_fdtable *fdtab, int fd);
130 struct dfs_file *fdt_get_file(struct dfs_fdtable* fdt, int fd);
131 void fdt_fd_release(struct dfs_fdtable* fdt, int fd);
133 int fdt_fd_associate_file(struct dfs_fdtable *fdt, int fd, struct dfs_file *file);
134 struct dfs_file *fd_get(int fd);
135 void fd_release(int fd);
137 void fd_init(struct dfs_file *fd);

Completed in 50 milliseconds

1234