fix: toybox命令升级
【背景】liteos_a toybox 命令升级升级 【修改方案】 1、help命令列表不支持命令删除。 2、cp命令和mv命令拷贝文件失败和文件损坏等问题修复。 3、修复du命令统计nfs文件大小为0问题修复。 4、修复ls命令nfs文件时间打印信息有误问题。 5、更新命令不支持入参列表。 re #I41N2A Signed-off-by: yansira <yansira@hotmail.com> Change-Id: I5f5b82e33ba9193ae06e9547182d5b7bac0a3b44
This commit is contained in:
@@ -1206,7 +1206,7 @@ OUT:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int SysStat(const char *path, struct stat *buf)
|
||||
int SysStat(const char *path, struct kstat *buf)
|
||||
{
|
||||
int ret;
|
||||
char *pathRet = NULL;
|
||||
@@ -1225,7 +1225,7 @@ int SysStat(const char *path, struct stat *buf)
|
||||
goto OUT;
|
||||
}
|
||||
|
||||
ret = LOS_ArchCopyToUser(buf, &bufRet, sizeof(struct stat));
|
||||
ret = LOS_ArchCopyToUser(buf, &bufRet, sizeof(struct kstat));
|
||||
if (ret != 0) {
|
||||
ret = -EFAULT;
|
||||
}
|
||||
@@ -1237,7 +1237,7 @@ OUT:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int SysLstat(const char *path, struct stat *buffer)
|
||||
int SysLstat(const char *path, struct kstat *buffer)
|
||||
{
|
||||
int ret;
|
||||
char *pathRet = NULL;
|
||||
@@ -1256,7 +1256,7 @@ int SysLstat(const char *path, struct stat *buffer)
|
||||
goto OUT;
|
||||
}
|
||||
|
||||
ret = LOS_ArchCopyToUser(buffer, &bufRet, sizeof(struct stat));
|
||||
ret = LOS_ArchCopyToUser(buffer, &bufRet, sizeof(struct kstat));
|
||||
if (ret != 0) {
|
||||
ret = -EFAULT;
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
#include "time.h"
|
||||
#include "sys/time.h"
|
||||
#include "sys/stat.h"
|
||||
#include "sys/kstat.h"
|
||||
#ifdef LOSCFG_FS_VFS
|
||||
#include "sys/socket.h"
|
||||
#include "dirent.h"
|
||||
@@ -252,8 +253,8 @@ extern int SysFtruncate(int fd, off_t length);
|
||||
extern int SysStatfs(const char *path, struct statfs *buf);
|
||||
extern int SysStatfs64(const char *path, size_t sz, struct statfs *buf);
|
||||
|
||||
extern int SysStat(const char *path, struct stat *buf);
|
||||
extern int SysLstat(const char *path, struct stat *buffer);
|
||||
extern int SysStat(const char *path, struct kstat *buf);
|
||||
extern int SysLstat(const char *path, struct kstat *buffer);
|
||||
extern int SysFstat(int fildes, struct stat *buf);
|
||||
extern int SysStatx(int fd, const char *restrict path, int flag, unsigned mask, struct statx *restrict stx);
|
||||
extern int SysFsync(int fd);
|
||||
|
||||
Reference in New Issue
Block a user