/kernel/liteos_a/kernel/extended/hilog/ |
D | los_hilog.c | 64 static ssize_t HiLogWrite(struct file *filep, const char *buffer, size_t bufLen); 65 static ssize_t HiLogRead(struct file *filep, char *buffer, size_t bufLen); 149 static int HiLogReadRingBuffer(unsigned char *buffer, size_t bufLen) in HiLogReadRingBuffer() argument 153 if (bufLeft > bufLen) { in HiLogReadRingBuffer() 154 retval = HiLogBufferCopy(buffer, bufLen, HiLogBufferHead(), bufLen); in HiLogReadRingBuffer() 156 retval = HiLogBufferCopy(buffer, bufLen, HiLogBufferHead(), bufLeft); in HiLogReadRingBuffer() 161 … retval = HiLogBufferCopy(buffer + bufLeft, bufLen - bufLeft, g_hiLogDev.buffer, bufLen - bufLeft); in HiLogReadRingBuffer() 166 static ssize_t HiLogRead(struct file *filep, char *buffer, size_t bufLen) in HiLogRead() argument 181 if (bufLen < header.len + sizeof(header)) { in HiLogRead() 182 … PRINTK("buffer too small,bufLen=%d, header.len=%d,%d\n", bufLen, header.len, header.hdrSize); in HiLogRead() [all …]
|
/kernel/liteos_a/kernel/common/ |
D | los_printf.c | 130 STATIC VOID OsVprintfFree(CHAR *buf, UINT32 bufLen) in OsVprintfFree() argument 132 if (bufLen != SIZEBUF) { in OsVprintfFree() 144 UINT32 bufLen = SIZEBUF; in OsVprintf() local 148 len = vsnprintf_s(bBuf, bufLen, bufLen - 1, fmt, ap); in OsVprintf() 157 OsVprintfFree(bBuf, bufLen); in OsVprintf() 159 bufLen = bufLen << 1; in OsVprintf() 160 if ((INT32)bufLen <= 0) { in OsVprintf() 164 bBuf = (CHAR *)LOS_MemAlloc(m_aucSysMem0, bufLen); in OsVprintf() 169 len = vsnprintf_s(bBuf, bufLen, bufLen - 1, fmt, ap); in OsVprintf() 185 OsVprintfFree(bBuf, bufLen); in OsVprintf()
|
D | console.c | 305 STATIC INT32 ConsoleReadFifo(CHAR *buffer, CONSOLE_CB *console, size_t bufLen) in ConsoleReadFifo() argument 310 readNum = MIN(bufLen, console->currentLen); in ConsoleReadFifo() 311 ret = memcpy_s(buffer, bufLen, console->fifo + console->fifoOut, readNum); in ConsoleReadFifo() 444 CHAR *buffer, size_t bufLen) in UserFilepRead() argument 457 ret = fops->read(filep, buffer, bufLen); in UserFilepRead() 477 ret = ConsoleReadFifo(buffer, consoleCB, bufLen); in UserFilepRead() 493 ret = ConsoleReadFifo(buffer, consoleCB, bufLen); in UserFilepRead() 499 … FilepRead(struct file *filep, const struct file_operations_vfs *fops, CHAR *buffer, size_t bufLen) in FilepRead() argument 510 ret = fops->read(filep, buffer, bufLen); in FilepRead() 514 …rite(struct file *filep, const struct file_operations_vfs *fops, const CHAR *buffer, size_t bufLen) in FilepWrite() argument [all …]
|
D | virtual_serial.c | 104 STATIC ssize_t SerialRead(struct file *filep, CHAR *buffer, size_t bufLen) in SerialRead() argument 116 ret = FilepRead(privFilep, fileOps, buffer, bufLen); in SerialRead() 128 STATIC ssize_t SerialWrite(struct file *filep, const CHAR *buffer, size_t bufLen) in SerialWrite() argument 140 ret = FilepWrite(privFilep, fileOps, buffer, bufLen); in SerialWrite()
|
D | console.h | 118 …FilepRead(struct file *filep, const struct file_operations_vfs *fops, CHAR *buffer, size_t bufLen); 119 …ite(struct file *filep, const struct file_operations_vfs *fops, const CHAR *buffer, size_t bufLen);
|
/kernel/liteos_a/net/telnet/src/ |
D | telnet_dev.c | 92 INT32 TelnetTx(const CHAR *buf, UINT32 bufLen) in TelnetTx() argument 106 if (bufLen > telnetDev->cmdFifo->fifoNum) { in TelnetTx() 107 bufLen = telnetDev->cmdFifo->fifoNum; in TelnetTx() 110 if (bufLen == 0) { in TelnetTx() 116 for (i = 0; i < bufLen; i++) { in TelnetTx() 122 telnetDev->cmdFifo->fifoNum -= bufLen; in TelnetTx() 132 return (INT32)bufLen; in TelnetTx() 199 STATIC ssize_t TelnetRead(struct file *file, CHAR *buf, size_t bufLen) in TelnetRead() argument 218 if (bufLen > (FIFO_MAX - telnetDev->cmdFifo->fifoNum)) { in TelnetRead() 219 bufLen = FIFO_MAX - telnetDev->cmdFifo->fifoNum; in TelnetRead() [all …]
|
/kernel/liteos_a/fs/proc/os_adapt/ |
D | process_proc.c | 79 …e_t ProcessContainerLink(unsigned int containerID, ContainerType type, char *buffer, size_t bufLen) in ProcessContainerLink() argument 83 count = snprintf_s(buffer, bufLen, bufLen - 1, "'pid:[%u]'", containerID); in ProcessContainerLink() 85 count = snprintf_s(buffer, bufLen, bufLen - 1, "'uts:[%u]'", containerID); in ProcessContainerLink() 87 count = snprintf_s(buffer, bufLen, bufLen - 1, "'mnt:[%u]'", containerID); in ProcessContainerLink() 89 count = snprintf_s(buffer, bufLen, bufLen - 1, "'ipc:[%u]'", containerID); in ProcessContainerLink() 91 count = snprintf_s(buffer, bufLen, bufLen - 1, "'time:[%u]'", containerID); in ProcessContainerLink() 93 count = snprintf_s(buffer, bufLen, bufLen - 1, "'user:[%u]'", containerID); in ProcessContainerLink() 95 count = snprintf_s(buffer, bufLen, bufLen - 1, "'net:[%u]'", containerID); in ProcessContainerLink() 104 static ssize_t ProcessContainerReadLink(struct ProcDirEntry *entry, char *buffer, size_t bufLen) in ProcessContainerReadLink() argument 118 if (LOS_IsUserAddressRange((VADDR_T)(UINTPTR)buffer, bufLen)) { in ProcessContainerReadLink() [all …]
|
D | proc_vfs.c | 428 ssize_t VfsProcfsReadlink(struct Vnode *vnode, char *buffer, size_t bufLen) in VfsProcfsReadlink() argument 441 result = pde->procFileOps->readLink(pde, buffer, bufLen); in VfsProcfsReadlink()
|
/kernel/liteos_a/lib/libscrew/src/ |
D | los_seq_buf.c | 93 int bufLen; in LosBufVprintf() local 110 bufLen = vsnprintf_s(seqBuf->buf + seqBuf->count, seqBuf->size - seqBuf->count, in LosBufVprintf() 112 if (bufLen >= 0) { in LosBufVprintf() 114 seqBuf->count += bufLen; in LosBufVprintf()
|
/kernel/uniproton/src/fs/vfs/ |
D | vfs_fs.c | 792 size_t bufLen = 0; in OsVfsReadv() local 803 if ((SSIZE_MAX - bufLen) < iov[i].iov_len) { in OsVfsReadv() 806 bufLen += iov[i].iov_len; in OsVfsReadv() 808 if (bufLen == 0) { in OsVfsReadv() 811 totalLen = bufLen * sizeof(char); in OsVfsReadv() 817 totalBytesRead = read(fd, buf, bufLen); in OsVfsReadv() 849 size_t bufLen = 0; in OsVfsWritev() local 860 if ((SSIZE_MAX - bufLen) < iov[i].iov_len) { in OsVfsWritev() 864 bufLen += iov[i].iov_len; in OsVfsWritev() 866 if (bufLen == 0) { in OsVfsWritev() [all …]
|
/kernel/liteos_m/components/trace/ |
D | trace_offline.c | 132 UINT32 bufLen; in OsTraceReset() local 135 bufLen = sizeof(TraceEventFrame) * g_traceRecoder.ctrl.maxRecordCount; in OsTraceReset() 136 (VOID)memset_s(g_traceRecoder.ctrl.frameBuf, bufLen, 0, bufLen); in OsTraceReset()
|
/kernel/liteos_a/kernel/extended/trace/ |
D | trace_offline.c | 130 UINT32 bufLen; in OsTraceReset() local 133 bufLen = sizeof(TraceEventFrame) * g_traceRecoder.ctrl.maxRecordCount; in OsTraceReset() 134 (VOID)memset_s(g_traceRecoder.ctrl.frameBuf, bufLen, 0, bufLen); in OsTraceReset()
|
/kernel/liteos_a/fs/jffs2/src/ |
D | vfs_jffs2.c | 306 ssize_t VfsJffs2Read(struct file *filep, char *buffer, size_t bufLen) in VfsJffs2Read() argument 319 off_t len = min(bufLen, (node->i_size - pos)); in VfsJffs2Read() 386 ssize_t VfsJffs2Write(struct file *filep, const char *buffer, size_t bufLen) in VfsJffs2Write() argument 440 ret = jffs2_write_inode_range(c, f, &ri, (unsigned char *)buffer, pos, bufLen, &writtenLen); in VfsJffs2Write() 455 if (writtenLen != bufLen) { in VfsJffs2Write() 469 pos += bufLen; in VfsJffs2Write() 764 ssize_t VfsJffs2Readlink(struct Vnode *vnode, char *buffer, size_t bufLen) in VfsJffs2Readlink() argument 776 if (bufLen == 0) { in VfsJffs2Readlink() 781 cnt = (bufLen - 1) < targetLen ? (bufLen - 1) : targetLen; in VfsJffs2Readlink() 782 if (LOS_CopyFromKernel(buffer, bufLen, (const char *)f->target, cnt) != 0) { in VfsJffs2Readlink()
|
/kernel/uniproton/src/core/ipc/sem/ |
D | prt_sem_minor.c | 72 OS_SEC_L4_TEXT U32 PRT_SemGetPendList(SemHandle semHandle, U32 *tskCnt, U32 *pidBuf, U32 bufLen) in PRT_SemGetPendList() argument 76 U32 len = (bufLen / sizeof(U32)); in PRT_SemGetPendList()
|
/kernel/liteos_m/components/fs/vfs/ |
D | vfs_fs.c | 1153 size_t bufLen = 0; in readv() local 1164 if ((SSIZE_MAX - bufLen) < iov[i].iov_len) { in readv() 1167 bufLen += iov[i].iov_len; in readv() 1169 if (bufLen == 0) { in readv() 1172 totalLen = bufLen * sizeof(char); in readv() 1178 totalBytesRead = read(fd, buf, bufLen); in readv() 1210 size_t bufLen = 0; in writev() local 1221 if ((SSIZE_MAX - bufLen) < iov[i].iov_len) { in writev() 1225 bufLen += iov[i].iov_len; in writev() 1227 if (bufLen == 0) { in writev() [all …]
|
/kernel/uniproton/src/core/ipc/queue/ |
D | prt_queue.c | 133 U32 bufLen; in PRT_QueueRead() local 150 bufLen = *len; in PRT_QueueRead() 174 if (memcpy_s(bufferAddr, bufLen, (void *)queueNode->buf, *len) != EOK) { in PRT_QueueRead()
|
/kernel/linux/linux-5.10/drivers/pinctrl/mediatek/ |
D | pinctrl-paris.h | 64 unsigned int gpio, char *buf, unsigned int bufLen);
|
D | pinctrl-paris.c | 575 unsigned int gpio, char *buf, unsigned int bufLen) in mtk_pctrl_show_one_pin() argument 611 len += scnprintf(buf + len, bufLen - len, in mtk_pctrl_show_one_pin() 625 len += scnprintf(buf + len, bufLen - len, " (%1d %1d)\n", in mtk_pctrl_show_one_pin() 628 len += scnprintf(buf + len, bufLen - len, "\n"); in mtk_pctrl_show_one_pin()
|
/kernel/liteos_a/syscall/ |
D | fs_syscall.c | 155 int bufLen = iovcnt * sizeof(struct iovec); in UserIovCopy() local 156 if (bufLen < 0) { in UserIovCopy() 160 *iovBuf = (struct iovec*)LOS_MemAlloc(OS_SYS_MEM_ADDR, bufLen); in UserIovCopy() 165 if (LOS_ArchCopyFromUser(*iovBuf, iov, bufLen) != 0) { in UserIovCopy() 1710 size_t bufLen = n; in SysGetcwd() local 1713 if (bufLen > PATH_MAX) { in SysGetcwd() 1714 bufLen = PATH_MAX; in SysGetcwd() 1717 bufRet = (char *)LOS_MemAlloc(OS_SYS_MEM_ADDR, bufLen); in SysGetcwd() 1721 (void)memset_s(bufRet, bufLen, 0, bufLen); in SysGetcwd() 1723 ret = getcwd((buf ? bufRet : NULL), bufLen); in SysGetcwd() [all …]
|
/kernel/uniproton/src/include/uapi/ |
D | prt_sem.h | 364 extern U32 PRT_SemGetPendList(SemHandle semHandle, U32 *tskCnt, U32 *pidBuf, U32 bufLen);
|
/kernel/liteos_a/fs/vfs/operation/ |
D | vfs_force_umount.c | 201 static ssize_t ErrorVopReadlink(struct Vnode *vnode, char *buffer, size_t bufLen) in ErrorVopReadlink() argument 205 (void)bufLen; in ErrorVopReadlink()
|
/kernel/liteos_a/fs/proc/include/ |
D | proc_fs.h | 93 ssize_t (*readLink)(struct ProcDirEntry *pde, char *buf, size_t bufLen);
|
/kernel/liteos_a/fs/vfs/include/ |
D | vnode.h | 162 ssize_t (*Readlink)(struct Vnode *vnode, char *buffer, size_t bufLen);
|
/kernel/uniproton/doc/design/ |
D | interface_description.md | 625 U32 PRT_SemGetPendList(SemHandle semHandle, U32 *tskCnt, U32 *pidBuf, U32 bufLen) 637 bufLen [IN] 类型#U32,用户指定的内存区域的长度(单位:字节)。 639 用户应保证存储任务PID清单的内存空间足够大,建议将bufLen配置为(#OS_TSK_MAX_SUPPORT_NUM + 1)
|
/kernel/liteos_a/fs/fat/os_adapt/ |
D | fatfs.c | 2167 ssize_t fatfs_readlink(struct Vnode *vnode, char *buffer, size_t bufLen) in fatfs_readlink() argument 2197 cnt = (bufLen - 1) < targetLen ? (bufLen - 1) : targetLen; in fatfs_readlink() 2198 ret = LOS_CopyFromKernel(buffer, bufLen, fs->win, cnt); in fatfs_readlink()
|