Description:vfs refactoring

Feature or Bugfix:Feature
Binary Source:Huawei
PrivateCode(Yes/No):Yes

Change-Id: I175d2648bc6f9078c34de2c0a5c93fda10b86c47
ChangeID:13306388
This commit is contained in:
wangchenyang
2021-01-14 16:50:10 +08:00
committed by mamingshuai
parent eb474b86bb
commit d970750808
78 changed files with 5341 additions and 4165 deletions

18
kernel/common/los_hilog.c Executable file → Normal file
View File

@@ -56,11 +56,11 @@ struct HiLogEntry {
ssize_t HilogRead(struct file *filep, char __user *buf, size_t count);
ssize_t HilogWrite(struct file *filep, const char __user *buf, size_t count);
int HiLogOpen(FAR struct file *filep);
int HiLogClose(FAR struct file *filep);
int HiLogOpen(struct file *filep);
int HiLogClose(struct file *filep);
static ssize_t HiLogWrite(FAR struct file *filep, const char *buffer, size_t bufLen);
static ssize_t HiLogRead(FAR struct file *filep, char *buffer, size_t bufLen);
static ssize_t HiLogWrite(struct file *filep, const char *buffer, size_t bufLen);
static ssize_t HiLogRead(struct file *filep, char *buffer, size_t bufLen);
STATIC struct file_operations_vfs g_hilogFops = {
HiLogOpen, /* open */
@@ -76,7 +76,7 @@ STATIC struct file_operations_vfs g_hilogFops = {
NULL, /* unlink */
};
FAR struct HiLogCharDevice {
struct HiLogCharDevice {
int flag;
LosMux mtx;
unsigned char *buffer;
@@ -92,13 +92,13 @@ static inline unsigned char *HiLogBufferHead(void)
return g_hiLogDev.buffer + g_hiLogDev.headOffset;
}
int HiLogOpen(FAR struct file *filep)
int HiLogOpen(struct file *filep)
{
(void)filep;
return 0;
}
int HiLogClose(FAR struct file *filep)
int HiLogClose(struct file *filep)
{
(void)filep;
return 0;
@@ -161,7 +161,7 @@ static int HiLogReadRingBuffer(unsigned char *buffer, size_t bufLen)
return retval;
}
static ssize_t HiLogRead(FAR struct file *filep, char *buffer, size_t bufLen)
static ssize_t HiLogRead(struct file *filep, char *buffer, size_t bufLen)
{
size_t retval;
struct HiLogEntry header;
@@ -301,7 +301,7 @@ out:
return retval;
}
static ssize_t HiLogWrite(FAR struct file *filep, const char *buffer, size_t bufLen)
static ssize_t HiLogWrite(struct file *filep, const char *buffer, size_t bufLen)
{
(void)filep;
if (bufLen + sizeof(struct HiLogEntry) > HILOG_BUFFER) {