Searched refs:fd (Results 1 - 25 of 113) sorted by relevance

12345

/u-boot/fs/
H A Dsemihostingfs.c26 long fd, size, ret; local
28 fd = smh_open(filename, MODE_READ | MODE_BINARY);
29 if (fd < 0)
30 return fd;
31 ret = smh_seek(fd, pos);
33 smh_close(fd);
37 size = smh_flen(fd);
39 smh_close(fd);
46 size = smh_read(fd, buffer, maxsize);
47 smh_close(fd);
58 long fd, size, ret; local
81 long fd, size; local
[all...]
/u-boot/arch/xtensa/include/asm/
H A Dposix_types.h56 #define __FD_SET(fd, fdsetp) \
57 (((fd_set *)fdsetp)->fds_bits[fd >> 5] |= (1<<(fd & 31)))
60 #define __FD_CLR(fd, fdsetp) \
61 (((fd_set *)fdsetp)->fds_bits[fd >> 5] &= ~(1<<(fd & 31)))
64 #define __FD_ISSET(fd, fdsetp) \
65 ((((fd_set *)fdsetp)->fds_bits[fd >> 5] & (1<<(fd & 31))) != 0)
/u-boot/arch/arm/include/asm/
H A Dposix_types.h70 #define __FD_SET(fd, fdsetp) \
71 (((fd_set *)fdsetp)->fds_bits[fd >> 5] |= (1<<(fd & 31)))
74 #define __FD_CLR(fd, fdsetp) \
75 (((fd_set *)fdsetp)->fds_bits[fd >> 5] &= ~(1<<(fd & 31)))
78 #define __FD_ISSET(fd, fdsetp) \
79 ((((fd_set *)fdsetp)->fds_bits[fd >> 5] & (1<<(fd & 31))) != 0)
/u-boot/lib/
H A Dsemihosting.c64 long fd; local
78 fd = smh_trap(SYSOPEN, &open);
79 if (fd == -1)
81 return fd;
86 * @fd: A file descriptor returned from smh_open()
91 long fd; member in struct:smh_rdwr_s
96 long smh_read(long fd, void *memp, size_t len) argument
101 debug("%s: fd %ld, memp %p, len %zu\n", __func__, fd, memp, len);
103 read.fd
113 smh_write(long fd, const void *memp, size_t len, ulong *written) argument
131 smh_close(long fd) argument
143 smh_flen(long fd) argument
155 smh_seek(long fd, long pos) argument
159 long fd; member in struct:smh_seek_s
[all...]
/u-boot/include/fsl-mc/
H A Dfsl_dpaa_fd.h38 static inline u64 ldpaa_fd_get_addr(const struct dpaa_fd *fd) argument
40 return (u64)((((uint64_t)fd->simple.addr_hi) << 32)
41 + fd->simple.addr_lo);
44 static inline void ldpaa_fd_set_addr(struct dpaa_fd *fd, u64 addr) argument
46 fd->simple.addr_hi = upper_32_bits(addr);
47 fd->simple.addr_lo = lower_32_bits(addr);
50 static inline u32 ldpaa_fd_get_len(const struct dpaa_fd *fd) argument
52 return fd->simple.len;
55 static inline void ldpaa_fd_set_len(struct dpaa_fd *fd, u32 len) argument
57 fd
60 ldpaa_fd_get_offset(const struct dpaa_fd *fd) argument
65 ldpaa_fd_set_offset(struct dpaa_fd *fd, uint16_t offset) argument
71 ldpaa_fd_get_bpid(const struct dpaa_fd *fd) argument
76 ldpaa_fd_set_bpid(struct dpaa_fd *fd, uint16_t bpid) argument
[all...]
/u-boot/common/spl/
H A Dspl_semihosting.c16 long fd = *(long *)load->priv; local
19 if (smh_seek(fd, file_offset))
22 ret = smh_read(fd, buf, size);
31 long fd, len; local
34 fd = smh_open(filename, MODE_READ | MODE_BINARY);
35 if (fd < 0) {
36 log_debug("could not open %s: %ld\n", filename, fd);
37 return fd;
40 ret = smh_flen(fd);
49 load.priv = &fd;
[all...]
/u-boot/arch/riscv/include/asm/
H A Dposix_types.h73 typeof(_fd) (fd) = (_fd); \
74 (((fd_set *)fdsetp)->fds_bits[fd >> 5] |= (1 << (fd & 31)))
78 typeof(_fd) (fd) = (_fd); \
79 (((fd_set *)fdsetp)->fds_bits[fd >> 5] &= ~(1 << (fd & 31)))
83 typeof(_fd) (fd) = (_fd); \
84 ((((fd_set *)fdsetp)->fds_bits[fd >> 5] & (1 << (fd & 31))) != 0)
88 typeof(_fdsetp) (fd)
[all...]
/u-boot/tools/gdb/
H A Dserial.c66 int fd; local
71 if ((fd = open(device, O_RDWR)) < 0)
74 if (tcsetattr(fd, TCSAFLUSH, &tios) < 0) {
75 (void)close(fd);
79 return fd;
83 serialreadchar(int fd, int timeout) argument
94 FD_SET(fd, &fds);
98 if ((n = select(fd + 1, &fds, 0, 0, &tv)) < 0)
104 if ((n = read(fd, &ch, 1)) < 0)
114 serialwrite(int fd, cha argument
129 serialclose(int fd) argument
[all...]
/u-boot/fs/sandbox/
H A Dsandboxfs.c25 int fd, ret; local
27 fd = os_open(filename, OS_O_RDONLY);
28 if (fd < 0)
29 return fd;
30 ret = os_lseek(fd, pos, OS_SEEK_SET);
32 os_close(fd);
38 os_close(fd);
45 size = os_read(fd, buffer, maxsize);
46 os_close(fd);
62 int fd, re local
[all...]
/u-boot/arch/microblaze/include/asm/
H A Dposix_types.h63 #define __FD_SET(fd, fd_set) \
64 __set_bit (fd, (void *)&((__kernel_fd_set *)fd_set)->fds_bits)
66 #define __FD_CLR(fd, fd_set) \
67 __clear_bit (fd, (void *)&((__kernel_fd_set *)fd_set)->fds_bits)
69 #define __FD_ISSET(fd, fd_set) \
70 __test_bit (fd, (void *)&((__kernel_fd_set *)fd_set)->fds_bits)
/u-boot/tools/
H A Dtermios_linux.h39 static inline int tcgetattr(int fd, struct termios *t) argument
42 return ioctl(fd, TCGETS2, t);
44 return ioctl(fd, TCGETS, t);
48 static inline int tcsetattr(int fd, int a, const struct termios *t) argument
79 return ioctl(fd, cmd, t);
82 static inline int tcdrain(int fd) argument
84 return ioctl(fd, TCSBRK, 1);
87 static inline int tcflush(int fd, int q) argument
89 return ioctl(fd, TCFLSH, q);
92 static inline int tcsendbreak(int fd, in argument
101 tcflow(int fd, int a) argument
106 tcgetsid(int fd) argument
[all...]
H A Dprelink-riscv.c83 int fd = open(argv[1], O_RDWR, 0); local
85 if (fd < 0)
90 if (fstat(fd, &st) < 0)
94 mmap(0, st.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
99 close(fd);
/u-boot/test/image/
H A Dspl_load_os.c16 int fd; member in struct:text_ctx
26 ret = os_lseek(text_ctx->fd, offset, OS_SEEK_SET);
33 res = os_read(text_ctx->fd, buf, size);
51 int fd; local
63 fd = os_open(fname, OS_O_RDONLY);
64 ut_assert(fd >= 0);
65 ut_asserteq(512, os_read(fd, header, 512));
66 text_ctx.fd = fd;
/u-boot/lib/libfdt/
H A Dtest_libfdt.py11 with open('b/sandbox_spl/u-boot.dtb') as fd:
12 fdt = fd.read()
/u-boot/fs/yaffs2/
H A Dyaffsfs.h81 int yaffs_close(int fd) ;
82 int yaffs_fsync(int fd) ;
83 int yaffs_fdatasync(int fd) ;
84 int yaffs_flush(int fd) ; /* same as yaffs_fsync() */
88 int yaffs_dup(int fd);
90 int yaffs_read(int fd, void *buf, unsigned int nbyte) ;
91 int yaffs_write(int fd, const void *buf, unsigned int nbyte) ;
93 int yaffs_pread(int fd, void *buf, unsigned int nbyte, loff_t offset);
94 int yaffs_pwrite(int fd, const void *buf, unsigned int nbyte, loff_t offset);
96 loff_t yaffs_lseek(int fd, loff_
[all...]
/u-boot/include/
H A Dsemihosting.h95 * @fd: A file descriptor returned from smh_open()
103 long smh_read(long fd, void *memp, size_t len);
107 * @fd: A file descriptor returned from smh_open()
114 long smh_write(long fd, const void *memp, size_t len, ulong *written);
118 * @fd: A file descriptor returned from smh_open()
122 long smh_close(long fd);
126 * @fd: A file descriptor returned from smh_open()
130 long smh_flen(long fd);
134 * @fd: A file descriptor returned from smh_open()
139 long smh_seek(long fd, lon
[all...]
/u-boot/drivers/block/
H A Dhost_dev.c27 int ret, fd; local
34 if (plat->fd)
35 return log_msg_ret("fd", -EEXIST);
42 fd = os_open(filename, OS_O_RDWR);
43 if (fd == -1) {
46 fd = os_open(filename, OS_O_RDONLY);
47 if (fd == -1) {
59 size = os_filesize(fd);
71 plat->fd = fd;
[all...]
H A Dsandbox.c29 if (os_lseek(plat->fd, start * desc->blksz, OS_SEEK_SET) == -1) {
33 ssize_t len = os_read(plat->fd, buffer, blkcnt * desc->blksz);
48 if (os_lseek(plat->fd, start * desc->blksz, OS_SEEK_SET) == -1) {
52 ssize_t len = os_write(plat->fd, buffer, blkcnt * desc->blksz);
/u-boot/board/gardena/smart-gateway-mt7688/
H A Dboard.c91 struct factory_data_values *fd; local
126 fd = (struct factory_data_values *)buf;
128 if (fd->magic != FACTORY_DATA_MAGIC)
131 crc = crc32(0, (u8 *)&fd->magic, FACTORY_DATA_CRC_LEN);
132 if (crc != fd->crc)
136 fd->version);
139 ptr = fd->wifi_mac;
151 ptr = fd->eth_mac;
163 env_updated |= prepare_uuid_var(fd->ipr_id, "linuxmoduleid", 'X');
164 env_updated |= prepare_uuid_var(fd
211 struct factory_data_values *fd; local
[all...]
/u-boot/arch/m68k/include/asm/
H A Dposix_types.h58 static __inline__ void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp) argument
60 unsigned long _tmp = fd / __NFDBITS;
61 unsigned long _rem = fd % __NFDBITS;
66 static __inline__ void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp) argument
68 unsigned long _tmp = fd / __NFDBITS;
69 unsigned long _rem = fd % __NFDBITS;
74 static __inline__ int __FD_ISSET(unsigned long fd, __kernel_fd_set *p) argument
76 unsigned long _tmp = fd / __NFDBITS;
77 unsigned long _rem = fd % __NFDBITS;
/u-boot/arch/powerpc/include/asm/
H A Dposix_types.h58 static __inline__ void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp) argument
60 unsigned long _tmp = fd / __NFDBITS;
61 unsigned long _rem = fd % __NFDBITS;
66 static __inline__ void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp) argument
68 unsigned long _tmp = fd / __NFDBITS;
69 unsigned long _rem = fd % __NFDBITS;
74 static __inline__ int __FD_ISSET(unsigned long fd, __kernel_fd_set *p) argument
76 unsigned long _tmp = fd / __NFDBITS;
77 unsigned long _rem = fd % __NFDBITS;
/u-boot/tools/binman/
H A Dcbfs_util.py483 def _skip_to(self, fd, offset, pad_byte):
487 fd: File objext to write to
490 if fd.tell() > offset:
492 (offset, fd.tell()))
493 fd.write(tools.get_bytes(pad_byte, offset - fd.tell()))
495 def _pad_to(self, fd, offset, pad_byte):
499 fd: File objext to write to
502 self._align_to(fd, self._align, pad_byte)
503 upto = fd
[all...]
/u-boot/arch/x86/include/asm/
H A Dposix_types.h56 #define __FD_SET(fd,fdsetp) \
58 "=m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd)))
61 #define __FD_CLR(fd,fdsetp) \
63 "=m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd)))
66 #define __FD_ISSET(fd,fdsetp) (__extension__ ({ \
69 :"=q" (__result) :"r" ((int) (fd)), \
/u-boot/drivers/scsi/
H A Dsandbox_scsi.c29 * @fd: File descriptor of backing file
34 int fd; member in struct:sandbox_scsi_priv
50 } else if (ret == SCSI_EMUL_DO_READ && priv->fd != -1) {
54 os_lseek(priv->fd, info->seek_block * info->block_size,
56 bytes_read = os_read(priv->fd, req->pdata, info->buff_used);
108 priv->fd = os_open(priv->pathname, OS_O_RDONLY);
109 if (priv->fd != -1) {
115 priv->fd = -1;
117 log_debug("filename: %s, fd %d\n", priv->pathname, priv->fd);
[all...]
/u-boot/arch/sandbox/cpu/
H A Dos.c48 ssize_t os_read(int fd, void *buf, size_t count) argument
50 return read(fd, buf, count);
53 ssize_t os_write(int fd, const void *buf, size_t count) argument
55 return write(fd, buf, count);
70 off_t os_lseek(int fd, off_t offset, int whence) argument
80 return lseek(fd, offset, whence);
115 int os_close(int fd) argument
118 if (fd)
119 return close(fd);
152 int fd; local
169 os_filesize(int fd) argument
186 int fd; local
292 int fd; local
370 os_tty_raw(int fd, bool allow_sigs) argument
747 int fd, ret; local
763 int fd, ret; local
785 int fd; local
861 int fd, err; local
937 int fd; local
1055 int fd; local
[all...]

Completed in 151 milliseconds

12345