前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >yaffsfs.c

yaffsfs.c

作者头像
瓜大三哥
发布2018-02-24 16:20:48
5520
发布2018-02-24 16:20:48
举报
文章被收录于专栏:瓜大三哥瓜大三哥

1.int yaffs_write(int fd, const void *buf, unsigned int nbyte)如果一个需要写入文件大于一个chunk咋办呢?(只是将不大于一个chunk的部分写入,那么剩下的咋办?)

2.off_t yaffs_lseek(int fd, off_t offset, int whence)

(1)SEEK_SET=0搜索位置为偏移量offset

(2)SEEK_CUR=1当前位置再加偏移量offset

(3)SEEK_END=2文件长度再加偏移量offset

3. yaffsfs_Lock();//看了半天,原来相当于一个信号量,进行互斥

4.这两个函数的具体区别在哪里

代码语言:js
复制
int yaffs_rmdir(const char *path)
{
 return yaffsfs_DoUnlink(path,1);
}
int yaffs_unlink(const char *path)
{
    return yaffsfs_DoUnlink(path,0);
}

5.改变当前状态还是parent状态(我感觉两个正好相反,后面需要test)

代码语言:js
复制
int yaffs_stat(const char *path, struct yaffs_stat *buf)
{
    return yaffsfs_DoStatOrLStat(path,buf,0);
}
int yaffs_lstat(const char *path, struct yaffs_stat *buf)
{
    return yaffsfs_DoStatOrLStat(path,buf,1);
} 

6.不用do{} while(0)结构,直接使用条件不就更方便吗?

7.struct yaffs_dirent *yaffs_readdir(yaffs_DIR *dirp)

8.void yaffs_rewinddir(yaffs_DIR *dirp)//返回上一级目录

9.int yaffs_DumpDevStruct(const char *path)

本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2016-05-01,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 瓜大三哥 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档