Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What are the related functions of yaffs

Shulou Source: shulou.com Published: 2022-06-01 06:33:05 09月26日 Update

This article mainly explains the "what are the yaffs-related functions", the content of the explanation is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in-depth, together to study and learn "yaffs-related functions" bar!

1.int yaffs_write (int fd, const void * buf, unsigned int nbyte) what if a file needs to be written to more than a chunk? (just write parts not larger than one chunk, what about the rest?)

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

(1) SEEK_SET=0 search location is offset offset

(2) the current position of SEEK_CUR=1 plus offset offset

(3) SEEK_END=2 file length plus offset offset

3. Yaffsfs_Lock (); / / after watching it for a long time, it is originally equivalent to a semaphore and mutually exclusive.

4. What is the specific difference between these two functions?

Int yaffs_rmdir (const char * path)

{

Return yaffsfs_DoUnlink (path,1)

}

Int yaffs_unlink (const char * path)

{

Return yaffsfs_DoUnlink (path,0)

}

5. Change the current state or parent state (I feel the two are just the opposite, and we need test later)

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. Wouldn't it be more convenient to directly use the conditions without using the do {} while (0) structure?

7.struct yaffs_dirent * yaffs_readdir (yaffs_DIR * dirp)

8.void yaffs_rewinddir (yaffs_DIR * dirp) / / returns the directory one level above

9.int yaffs_DumpDevStruct (const char * path)

Thank you for your reading, these are the contents of "what are the yaffs-related functions?" after the study of this article, I believe you have a deeper understanding of what the yaffs-related functions have, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Function offset learning two location content file state no signal just just thought situation feeling article more condition directory knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Shulou Technology Apple Shulou Tech Info Xiaomi