提交 fa124f37 编写于 作者: C chenwei

fix: romfs compile error

1, remove FAR
2, remove debug.h
3, add include vnode.h, fs.h, file.h

close: #I3XGHA
Signed-off-by: Nchenwei <chenwei26@huawei.com>
上级 b98233ea
......@@ -53,7 +53,6 @@
#include <limits.h>
#include <assert.h>
#include <errno.h>
#include <debug.h>
#include "fs_romfs.h"
......
......@@ -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);
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册