openharmony_ci
5db839acef
!362 修复在Liteos-a在FATFS中创建的文件夹在Ubuntu中不可见的BUG
...
Merge pull request !362 from Far/fatfs
2021-06-25 07:20:10 +00:00
openharmony_ci
12577eade5
!358 feat: L1支持低功耗投票框架
...
Merge pull request !358 from zhushengle/pm_v
2021-06-25 00:26:41 +00:00
openharmony_ci
de6db86df3
!364 GetFileMappingList函数实现未加void导致gcc编译报错
...
Merge pull request !364 from 野生毛霉君/master
2021-06-24 12:47:37 +00:00
mucor
56b8ecaf17
fix: add (void) to GetFileMappingList method
...
close: #I3XPXY
Signed-off-by: mucor <mucorwang@gmail.com>
2021-06-24 20:32:47 +08:00
openharmony_ci
112cdebe41
!357 修改/proc/mounts显示格式
...
Merge pull request !357 from JING/mount
2021-06-24 08:27:32 +00:00
openharmony_ci
a28dcc38c9
!360 增加清除文件系统缓存的维测接口
...
Merge pull request !360 from 野生毛霉君/master
2021-06-24 07:34:45 +00:00
mucor
3d1cf683f3
feat: add clear cache cmd to /proc/fs_cache
...
write "clear pathcahe" to clear pathcaches and vnodes
write "clear pagecache" to clear pagecaches
write "clear all" to clear both pathcaches and pagechaches
the cache in use will not be cleared
close: #I3XLPH
Signed-off-by: mucor <mucorwang@gmail.com>
2021-06-24 15:11:50 +08:00
Far
a9fc1e0e5d
fix: Liteos-a创建的文件夹在Ubuntu中不可见
...
Linux的文件夹需要包含"."和".."才会被视为一个有效的目录
通过在新建的文件夹中创建"."和".."目录项修复这个BUG
Close #I3XMY6
Signed-off-by: Far <yesiyuan2@huawei.com>
2021-06-24 15:09:12 +08:00
zhushengle
21d8ac8752
feat: L1支持低功耗投票框架
...
功能描述:
在proc目录下增加power目录,添加powr_mode,power_lock,power_unlock和power_count节点,
power_mode:节点用于查询和设置系统支持的功耗模式
power_lock:用于查询和获取低功耗锁,持锁后,将会阻止系统进入低功耗状态
power_unlock: 用于释放已经持有的低功耗锁,也可查询当前有那些持有低功耗锁
power_count:用于查询当前持有低功耗锁的个数
Close #I3VS5N
Change-Id: I2e2881cc968eab3c5fa6f9dbd7e8c5e448609407
Signed-off-by: zhushengle <zhushengle@huawei.com>
2021-06-24 14:27:23 +08:00
openharmony_ci
008fa8660d
!337 fix: fatfs memory leak
...
Merge pull request !337 from jianjian/master
2021-06-24 05:36:29 +00:00
chenjing
6860246cfa
fix: 修改/proc/mounts显示格式
...
显示信息内容及格式修改为与posix标准一致,内容包括:
1、挂载设备名
2、挂载点路径
3、文件系统类型
4、挂载选项(此项暂不支持,打印())
5、dump频率(此项暂不支持,值为0)
6、fsck检查次序(此项暂不支持,值为0)
close #I3XGCS
Signed-off-by: chenjing <chenjing139@huawei.com>
Change-Id: I2a8cb093e7c5316feb55fb196bc1b4301d8d0249
2021-06-23 17:10:29 +08:00
openharmony_ci
8fe0cc7770
!344 对proc文件系统内的节点增加uid/gid管理
...
Merge pull request !344 from LeonChan/proc-uid
2021-06-23 01:21:12 +00:00
chenwei
600dded31e
feat: add /proc/fd file to dump the pid/fd/path information
...
1, for users with privilege, display all users' fd info with the template "Pid Fd SysFd Path"
2, for normal user, display its own fd info with the template "Pid Fd Path"
close #I3WB5U
Signed-off-by: chenwei <chenwei26@huawei.com>
2021-06-22 17:27:25 +08:00
chenwei
67806596a3
feat: add uid/gid for ProcFs
...
close: #I3WGVP
Signed-off-by: chenwei <chenwei26@huawei.com>
2021-06-22 15:40:00 +08:00
mucor
231cb6be27
feat: add /proc/fs_cache to display cache info
...
add /proc/fs_cache to display vnode, path cache, page cache.
also change some bad virable name
close: #I3WWBD
Signed-off-by: mucor <mucorwang@gmail.com>
2021-06-22 14:53:17 +08:00
SimonLi
2f3d7efc24
回退 'Pull Request !342 : 增加/proc/fs_cache来显示文件系统缓存维测信息'
2021-06-21 21:33:52 +08:00
openharmony_ci
b3120b5498
!342 增加/proc/fs_cache来显示文件系统缓存维测信息
...
Merge pull request !342 from 野生毛霉君/master
2021-06-21 17:21:02 +08:00
mucor
53c6d96c6f
feat: add /proc/fs_cache to display cache info
...
add /proc/fs_cache to display vnode, path cache, page cache.
also change some bad virable name
close: #I3WESD
Signed-off-by: mucor <mucorwang@gmail.com>
2021-06-21 16:11:06 +08:00
chenjing
e9ad6b71c3
fix: 增加表头,内容以制表符分栏。
...
close #I3W2M9
Signed-off-by: chenjing <chenjing139@huawei.com>
Change-Id: If8ba7047e2914a3104182bf017f437c2ae962625
2021-06-21 14:17:03 +08:00
openharmony_ci
e5a3ee6f33
!331 LOSCFG_FS_FAT_VIRTUAL_PARTITION宏开关错误作用域引起的FATFS功能错误
...
Merge pull request !331 from Far/master
2021-06-21 13:13:06 +08:00
jianjian
fbfd71dfe3
fix: fatfs memory leak
...
Signed-off-by: jianjian <xingjian_liu@yeah.net>
2021-06-20 13:42:01 +08:00
mucor
73a777777e
fix: remove redundant headfile
...
1.remove redundant headfile in kernel, such as:
compiler.h;debug.h;automount.h;inode.h;syslog.h;net.h;
2.split fs.h to file.h and driver.h
3.move vnode.h and path_cache.h to vfs/include
4.remove redundant interface and defines
close: #I3RTNR
Signed-off-by: mucor <mucorwang@gmail.com>
2021-06-19 17:32:47 +08:00
Far
acda419a2d
fix: 修复了LOSCFG_FS_FAT_VIRTUAL_PARTITION宏开关错误作用域引起的功能错误
...
在init_cluster函数中,若未打开LOSCFG_FS_FAT_VIRTUAL_PARTITION会导致循环初始化
簇时,未调用sync_window函数,进而导致创建的文件夹未能正确置零。
Close #I3W1IW
Signed-off-by: Far <yesiyuan2@huawei.com>
2021-06-17 20:56:36 +08:00
openharmony_ci
9169637084
!310 fatfs支持symlink与readlink功能
...
Merge pull request !310 from JING/link
2021-06-17 10:03:38 +08:00
chenjing
e50cf0be6f
feat: fatfs支持符号链接功能
...
1 将fatfs_creat与fatfs_mkdir抽象成fatfs_creat_obj,通过参数type控制创建的对象类型;
2 新增fatfs_symlink与fatfs_readlink接口,其中:
1) fatfs_symlink通过fatfs_creat_obj创建出符号链接文件,并为其申请新簇,将target内容写入簇的第一个sector;
2) fatfs_readlink读出符号链接文件对应簇中第一个sector的内容
close #I3V8D1
Signed-off-by: chenjing <chenjing139@huawei.com>
Change-Id: I38dfaa28af156399817530923534d5b73b4c64af
2021-06-15 11:32:55 +08:00
openharmony_ci
b91fabb76c
!292 新增link/symlink/readlink接口的系统调用及内核实现
...
Merge pull request !292 from JING/link
2021-06-10 13:02:04 +08:00
chenjing
6eddc869d3
feat: support link/symlink/readlink
...
新增link/symlink/readlink接口的系统调用及内核实现,当前仅支持jffs2文件系统。具体接口说明如下:
一、hard link
接口原型:
int link(const char *oldpath, const char *newpath);
int linkat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath, int flags);
作用:
创建oldpath的硬链接,名为newpath。
功能说明:
1、newpath与oldpath必须在同一挂载分区内。
2、若newpath已存在,不会覆盖,错误码EEXIST。
3、oldpath必须为普通文件或者软链接文件。
4、如果oldpath是一个软链接文件,那么:
若调用link接口或者linkat(flags=0),创建出软链接文件的硬链接;
若调用linkat(flags = AT_SYMLINK_FOLLOW),创建出软链接所指向源文件的硬链接。
5、oldpath与newpath对应同一个文件,对oldpath与newpath任一名字的操作都是直接操作文件,没有“原始文件”的说法。
6、使用cp命令拷贝一个硬链接文件,生成文件的拷贝,新文件的nlink数为1。
7、删除oldpath或newpath,底层文件仍存在,可以通过另一个path访问。只有当两个path都删除之后,才会真正将文件删除,空间释放。
二、symbol link
接口原型:
int symlink(const char *target, const char *linkpath);
int symlinkat(const char *target, int newdirfd, const char *linkpath);
作用:
创建一个软链接文件linkpath,存储字符串target。
功能说明:
1、target可以为任意字符串(长度小于PATH_MAX)。
2、若linkpath文件名已存在,不会覆盖,错误码EEXIST。
3、用readlink函数可读取软链接的target内容。
4、软链接文件本身大小为target长度。
5、ls时软链接文件类型显示为 'l'。
6、symlink最大循环次数为CONFIG_FS_MAX_LNK_CNT(目前为40),超出则返回错误,错误码ELOOP。
7、使用cp命令拷贝一个软链接文件:
若target是一个文件:创建一个源文件的拷贝,类型为普通文件;
若target非文件:拷贝失败。
三、readlink
接口原型:
ssize_t readlink(const char *pathname, char *buf, size_t bufsiz);
ssize_t readlinkat(int dirfd, const char *pathname, char *buf, size_t bufsiz);
作用:
读取软链接文件存放的的target内容。
功能说明:
1、pathname必须为软链接文件,否则错误码EINVAL。
2、如果bufsiz小于target长度,则截断target。
close #I3Q0OD
Change-Id: I3864d6069b627b705a369e8e32dc1eb922dc0157
Signed-off-by: chenjing <chenjing139@huawei.com>
2021-06-09 16:39:41 +08:00
lzl
6352d6e1da
kernel adapter
...
Signed-off-by: lzl <sucer_fater@163.com>
2021-06-08 09:07:04 +00:00
openharmony_ci
1a3f3f54e7
!302 fix: Codex告警清零
...
Merge pull request !302 from Far/master
2021-06-08 08:48:48 +08:00
chenwei
101a55d119
fix: codex
...
1,VFS代码中不修改参数增加const修饰
2,fs_file_mapping.c: 增加安全函数的判空
3,path_cache.c: sizeof改为使用类型
4,fs_syscall.c: 对NULL解引用
5,VnodeLookup:冗余的判空,及不正确的判空
close: I3UMWD
Signed-off-by: yansira <yansira@hotmail.com>
2021-06-07 22:45:40 +08:00
Far
b5370af822
fix: codex clean
...
1. 修复可能对NULL指针解引用的场景
2. 将不修改内容的指针入参修改为const
3. 对getpgrp的返回值进行校验后再使用
4. 修复了局部变量未初始化的问题
Close #I3UOFN
Signed-off-by: Far <yesiyuan2@huawei.com>
2021-06-07 17:08:02 +08:00
openharmony_ci
efbab200aa
!254 memory-based romfs
...
Merge pull request !254 from LeonChan/lc-master
2021-06-04 23:22:25 +08:00
openharmony_ci
a580754751
!295 修复删除/dev目录下的文件但是vnode number没有减小的问题
...
Merge pull request !295 from LeonChan/lc-bugfix-vnode
2021-06-04 21:50:32 +08:00
chenwei
4f514a16af
fix: the total used vnode number not increased after unlink a file under
...
/dev/
fix #I3TS1Y
Signed-off-by: yansira <yansira@hotmail.com>
2021-06-04 16:49:04 +08:00
chenwei
c4595d2504
feat(file system): add memory-based romfs
...
1, this RomFS's codebase is Nuttx romfs, then it is compatible with
Linux RomFS and you can create such a file system using the tool genromfs.
2, there are two major changes against with the original Nuttx romfs:
1), it is memory-based: all contents of the fs are stored in the
memory in the very first stage of "mount".
2), this version of romfs is altered to be compatible with our new
version of VFS to take advantage of vnode cache and path cache.
close: #I3S0CP
2021-06-04 16:39:51 +08:00
li_zan
f10dd7c135
feat: A核proc文件系统在echo模式下新增write的功能
...
close: #I3T6MZ
Signed-off-by: li_zan <371442490@qq.com>
2021-06-04 16:14:18 +08:00
openharmony_ci
3f16f1684a
!248 fix: fix length typo
...
Merge pull request !248 from kenneth/los_queue.h
2021-05-22 09:13:46 +08:00
arvinzzz
8cde768588
refactor: Refactored the kernel boot process and added a init framework
...
close: #I3I768
Change-Id: I4f801df4abe1a9afdf43391c28276e96a5e81513
2021-05-20 16:45:43 +08:00
kenneth
12d98b144b
fix: fix length typo
...
fix typos length、there、necessary
close https://gitee.com/openharmony/kernel_liteos_a/issues/I3RSY0
2021-05-18 14:33:59 +08:00
openharmony_ci
616ca955d5
!220 statfs不能正常显示FAT12和FAT16分区的空闲块和有效块
...
Merge pull request !220 from Far/fatfs
2021-05-15 10:01:28 +08:00
zhOu
f76fa4a344
feature: support ipc copy fd to process
2021-05-11 14:56:09 +08:00
Far
9503c4a9fc
fix: statfs can't get f_bfree and f_bavail of a FAT12/FAT16 partition
...
FAT12/FAT16 partition has no FSINFO sector storing the free cluster number,
so scanning the FAT is necessary to get the free clusters nums.
Close #I3Q0VS
2021-05-08 10:02:55 +08:00
mucor
04bcb11c3c
fix:add vnode destory for unregister dev node
...
Change-Id: I2205bbf42e7c2339f81443ace6924b12f4fa1c09
2021-04-30 15:31:03 +08:00
mucor
749420308e
fix:shell cmd rm -r crash when open target dir failed
...
Change-Id: I1146ab12b02aeef3f9a2a0422ee45936f5e4c105
2021-04-29 16:52:13 +08:00
openharmony_ci
1d0a3f022b
!186 将VnodeInUseIter和VnodeFreeAll函数改为非递归
...
Merge pull request !186 from Far/dev
2021-04-29 10:04:50 +08:00
openharmony_ci
6467ebb2dd
!194 PathCacheMemoryDump内存占用统计错误
...
Merge pull request !194 from Far/master
2021-04-29 09:58:45 +08:00
openharmony_ci
67f9f7506c
!192 format函数错误分支未释放锁
...
Merge pull request !192 from Far/fatfs
2021-04-29 09:57:58 +08:00
Far
5f6656cb36
fix: VnodeInUseIter and VnodeFreeAll used to be recursive
...
Function VnodeInUseIter and VnodeFreeAll used to be recursive.
Now we traverse the current in-use vnode list to find the vnode in
1 filesystem
Close #I3NN3U
2021-04-28 14:35:29 +08:00
Far
87da7c794c
fix: PathCacheMemoryDump miscalculate the RAM usage of PathCache
...
PathCacheMemoryDump miscalculate the RAM usage of PathCache for not
counting the name field of PathCache, which is allocated with PathCache
Close #I3OBXY
2021-04-28 14:31:31 +08:00
mucor
aa34ffe7c7
fix:remove redundant code
...
Change-Id: I8662952ac9d7912aaf2e2e72f779b3def41d14c4
2021-04-28 09:57:32 +08:00