Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party NuttX
提交
5d2284d0
T
Third Party NuttX
项目概览
OpenHarmony
/
Third Party NuttX
大约 1 年 前同步成功
通知
5
Star
19
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party NuttX
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5d2284d0
编写于
6月 24, 2021
作者:
O
openharmony_ci
提交者:
Gitee
6月 24, 2021
浏览文件
操作
浏览文件
下载
差异文件
!50 修复romfs编译错误
Merge pull request !50 from LeonChan/lc-romfs-bugfix
上级
b98233ea
fa124f37
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
26 addition
and
26 deletion
+26
-26
fs/romfs/fs_romfs.c
fs/romfs/fs_romfs.c
+0
-1
fs/romfs/fs_romfs.h
fs/romfs/fs_romfs.h
+23
-21
fs/romfs/fs_romfsutil.c
fs/romfs/fs_romfsutil.c
+3
-4
未找到文件。
fs/romfs/fs_romfs.c
浏览文件 @
5d2284d0
...
...
@@ -53,7 +53,6 @@
#include <limits.h>
#include <assert.h>
#include <errno.h>
#include <debug.h>
#include "fs_romfs.h"
...
...
fs/romfs/fs_romfs.h
浏览文件 @
5d2284d0
...
...
@@ -45,9 +45,11 @@
#include <stdint.h>
#include <stdbool.h>
#include <fs/dirent_fs.h>
#include "fs/dirent_fs.h"
#include "fs/fs.h"
#include "fs/file.h"
#include "disk.h"
#include "vnode.h"
/****************************************************************************
* Pre-processor Definitions
...
...
@@ -157,7 +159,7 @@ struct romfs_mountpt_s
struct
romfs_file_s
{
FAR
struct
romfs_file_s
*
rf_next
;
/* Retained in a singly linked list */
struct
romfs_file_s
*
rf_next
;
/* Retained in a singly linked list */
uint32_t
rf_startoffset
;
/* Offset to the start of the file data */
uint32_t
rf_size
;
/* Size of the file in bytes */
uint32_t
rf_cachesector
;
/* Current sector in the rf_buffer */
...
...
@@ -206,25 +208,25 @@ extern "C"
* Public Function Prototypes
****************************************************************************/
void
romfs_semtake
(
FAR
struct
romfs_mountpt_s
*
rm
);
void
romfs_semgive
(
FAR
struct
romfs_mountpt_s
*
rm
);
int
romfs_hwread
(
FAR
struct
romfs_mountpt_s
*
rm
,
FAR
uint8_t
*
buffer
,
void
romfs_semtake
(
struct
romfs_mountpt_s
*
rm
);
void
romfs_semgive
(
struct
romfs_mountpt_s
*
rm
);
int
romfs_hwread
(
struct
romfs_mountpt_s
*
rm
,
uint8_t
*
buffer
,
uint32_t
sector
,
unsigned
int
nsectors
);
int
romfs_filecacheread
(
FAR
struct
romfs_mountpt_s
*
rm
,
FAR
struct
romfs_file_s
*
rf
,
uint32_t
sector
);
int
romfs_hwconfigure
(
FAR
struct
romfs_mountpt_s
*
rm
);
int
romfs_fsconfigure
(
FAR
struct
romfs_mountpt_s
*
rm
);
int
romfs_checkmount
(
FAR
struct
romfs_mountpt_s
*
rm
);
int
romfs_finddirentry
(
FAR
struct
romfs_mountpt_s
*
rm
,
FAR
struct
romfs_dirinfo_s
*
dirinfo
,
FAR
const
char
*
path
);
int
romfs_parsedirentry
(
FAR
struct
romfs_mountpt_s
*
rm
,
uint32_t
offset
,
FAR
uint32_t
*
poffset
,
FAR
uint32_t
*
pnext
,
FAR
uint32_t
*
pinfo
,
FAR
uint32_t
*
psize
);
int
romfs_parsefilename
(
FAR
struct
romfs_mountpt_s
*
rm
,
uint32_t
offset
,
FAR
char
*
pname
);
int
romfs_datastart
(
FAR
struct
romfs_mountpt_s
*
rm
,
uint32_t
offset
,
FAR
uint32_t
*
start
);
int
romfs_filecacheread
(
struct
romfs_mountpt_s
*
rm
,
struct
romfs_file_s
*
rf
,
uint32_t
sector
);
int
romfs_hwconfigure
(
struct
romfs_mountpt_s
*
rm
);
int
romfs_fsconfigure
(
struct
romfs_mountpt_s
*
rm
);
int
romfs_checkmount
(
struct
romfs_mountpt_s
*
rm
);
int
romfs_finddirentry
(
struct
romfs_mountpt_s
*
rm
,
struct
romfs_dirinfo_s
*
dirinfo
,
const
char
*
path
);
int
romfs_parsedirentry
(
struct
romfs_mountpt_s
*
rm
,
uint32_t
offset
,
uint32_t
*
poffset
,
uint32_t
*
pnext
,
uint32_t
*
pinfo
,
uint32_t
*
psize
);
int
romfs_parsefilename
(
struct
romfs_mountpt_s
*
rm
,
uint32_t
offset
,
char
*
pname
);
int
romfs_datastart
(
struct
romfs_mountpt_s
*
rm
,
uint32_t
offset
,
uint32_t
*
start
);
int
romfs_searchdir
(
struct
romfs_mountpt_s
*
rm
,
const
char
*
entryname
,
int
entrylen
,
uint32_t
firstoffset
,
struct
romfs_dirinfo_s
*
dirinfo
);
...
...
fs/romfs/fs_romfsutil.c
浏览文件 @
5d2284d0
...
...
@@ -48,7 +48,6 @@
#include <assert.h>
#include <errno.h>
#include <assert.h>
#include <debug.h>
#ifdef LOSCFG_FS_ROMFS
#include "fs_romfs.h"
...
...
@@ -400,7 +399,7 @@ int romfs_fsconfigure(struct romfs_mountpt_s *rm)
/* The root directory entry begins right after the header */
name
=
(
FAR
const
char
*
)
&
rm
->
rm_buffer
[
ROMFS_VHDR_VOLNAME
];
name
=
(
const
char
*
)
&
rm
->
rm_buffer
[
ROMFS_VHDR_VOLNAME
];
rm
->
rm_rootoffset
=
ROMFS_ALIGNUP
(
ROMFS_VHDR_VOLNAME
+
strlen
(
name
)
+
1
);
/* and return success */
...
...
@@ -523,7 +522,7 @@ int romfs_parsefilename(struct romfs_mountpt_s *rm, uint32_t offset,
{
/* Yes.. then this chunk is less than 16 */
chunklen
=
strlen
((
FAR
char
*
)
&
rm
->
rm_buffer
[
ndx
]);
chunklen
=
strlen
((
char
*
)
&
rm
->
rm_buffer
[
ndx
]);
done
=
true
;
}
else
...
...
@@ -612,4 +611,4 @@ int romfs_datastart(struct romfs_mountpt_s *rm, uint32_t offset,
return
-
EINVAL
;
/* Won't get here */
}
#endif
\ No newline at end of file
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录