mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
Run codespell -w with the latest dictonary again
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Abdelatif Guettouche
parent
55a7dfc9a7
commit
cde88cabcc
@@ -64,7 +64,7 @@ static inline void seekpseudodir(struct fs_dirent_s *idir, off_t offset)
|
||||
|
||||
/* Determine a starting point for the seek. If the seek
|
||||
* is "forward" from the current position, then we will
|
||||
* start at the current poisition. Otherwise, we will
|
||||
* start at the current position. Otherwise, we will
|
||||
* "rewind" to the root dir.
|
||||
*/
|
||||
|
||||
@@ -121,7 +121,7 @@ static inline void seekmountptdir(struct fs_dirent_s *idir, off_t offset)
|
||||
|
||||
/* Determine a starting point for the seek. If the seek
|
||||
* is "forward" from the current position, then we will
|
||||
* start at the current poisition. Otherwise, we will
|
||||
* start at the current position. Otherwise, we will
|
||||
* "rewind" to the root dir.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@
|
||||
|
||||
CSRCS += fs_registerdriver.c fs_unregisterdriver.c
|
||||
|
||||
# Don't build-in block driver support if there are no mountpoints
|
||||
# Don't built-in block driver support if there are no mountpoints
|
||||
|
||||
ifneq ($(CONFIG_DISABLE_MOUNTPOINT),y)
|
||||
CSRCS += fs_registerblockdriver.c fs_unregisterblockdriver.c
|
||||
|
||||
+2
-2
@@ -109,7 +109,7 @@ int find_blockdriver(FAR const char *pathname, int mountflags,
|
||||
*
|
||||
* Errors that may be returned:
|
||||
*
|
||||
* ENOMEM - Failed to create a temporay path name.
|
||||
* ENOMEM - Failed to create a temporary path name.
|
||||
*
|
||||
* Plus:
|
||||
*
|
||||
@@ -142,7 +142,7 @@ int block_proxy(FAR const char *blkdev, int oflags);
|
||||
*
|
||||
* Errors that may be returned:
|
||||
*
|
||||
* ENOMEM - Failed to create a temporay path name.
|
||||
* ENOMEM - Failed to create a temporary path name.
|
||||
*
|
||||
* Plus:
|
||||
*
|
||||
|
||||
@@ -148,7 +148,7 @@ static FAR char *unique_chardev(void)
|
||||
*
|
||||
* Errors that may be returned:
|
||||
*
|
||||
* ENOMEM - Failed to create a temporay path name.
|
||||
* ENOMEM - Failed to create a temporary path name.
|
||||
*
|
||||
* Plus:
|
||||
*
|
||||
|
||||
@@ -145,7 +145,7 @@ static FAR char *unique_blkdev(void)
|
||||
*
|
||||
* Errors that may be returned:
|
||||
*
|
||||
* ENOMEM - Failed to create a temporay path name.
|
||||
* ENOMEM - Failed to create a temporary path name.
|
||||
*
|
||||
* Plus:
|
||||
*
|
||||
|
||||
+2
-2
@@ -110,7 +110,7 @@ config FAT_FORCE_INDIRECT
|
||||
from mixed locations, some of which are DMA-able and some of
|
||||
which are not. But CONFIG_FAT_FORCE_INDIRECT could be used
|
||||
without CONFIG_FAT_DMAMEMORY if there is, for example, only a
|
||||
memory aligment constraints.
|
||||
memory alignment constraints.
|
||||
|
||||
FORCE_ DMA DIRECT EXAMPLE USAGE
|
||||
INDIRECT MEMORY RETRY
|
||||
@@ -184,7 +184,7 @@ config FAT_DIRECT_RETRY
|
||||
The lower level SDIO driver may have, certain requirements on the
|
||||
memory buffer in order to perform the transfer. Perhaps special
|
||||
DMA memory should be used (with CONFIG_FAT_DMAMEMORY) or perhaps
|
||||
some special memory alignment is required to interace with the
|
||||
some special memory alignment is required to interface with the
|
||||
hardware.
|
||||
|
||||
If this option is selected, then the FAT file system will first
|
||||
|
||||
+1
-1
@@ -1104,7 +1104,7 @@ static off_t fat_seek(FAR struct file *filep, off_t offset, int whence)
|
||||
goto errout_with_semaphore;
|
||||
}
|
||||
|
||||
/* Attempts to set the position beyound the end of file will
|
||||
/* Attempts to set the position beyond the end of file will
|
||||
* work if the file is open for write access.
|
||||
*/
|
||||
|
||||
|
||||
+4
-4
@@ -242,7 +242,7 @@
|
||||
*/
|
||||
|
||||
#define DIR_NAME 0 /* 11@ 0: NAME: 8 bytes + 3 byte extension */
|
||||
#define DIR_ATTRIBUTES 11 /* 1@11: File attibutes (see below) */
|
||||
#define DIR_ATTRIBUTES 11 /* 1@11: File attributes (see below) */
|
||||
#define DIR_NTRES 12 /* 1@12: Reserved for use by NT */
|
||||
#define DIR_CRTTIMETENTH 13 /* 1@13: Tenth sec creation timestamp */
|
||||
#define DIR_CRTIME 14 /* 2@14: Time file created */
|
||||
@@ -371,7 +371,7 @@
|
||||
#define FAT_BAD 0x0ffffff7
|
||||
|
||||
/****************************************************************************
|
||||
* Maximum cluster by FAT type. This is the key value used to distinquish
|
||||
* Maximum cluster by FAT type. This is the key value used to distinguish
|
||||
* between FAT12, 16, and 32.
|
||||
*/
|
||||
|
||||
@@ -847,7 +847,7 @@
|
||||
*
|
||||
* Some hardware, however, may require special DMA-capable memory in
|
||||
* order to perform the transfers. If CONFIG_FAT_DMAMEMORY is defined
|
||||
* then the architecture-specific hardware must provide the funtions
|
||||
* then the architecture-specific hardware must provide the functions
|
||||
* fat_dma_alloc() and fat_dma_free() as prototyped below: fat_dmalloc()
|
||||
* will allocate DMA-capable memory of the specified size; fat_dmafree()
|
||||
* is the corresponding function that will be called to free the DMA-
|
||||
@@ -926,7 +926,7 @@ struct fat_file_s
|
||||
|
||||
/* This structure holds the sequence of directory entries used by one
|
||||
* file element (directory or file). For short file names, this is
|
||||
* single diretory entry. But for long file names, the is a sequence
|
||||
* single directory entry. But for long file names, the is a sequence
|
||||
* of directory entries. Long directory name entries appear in reverse
|
||||
* order: Last, next-to-last, ..., first. The "first" long file name
|
||||
* directory is then following by the short directory name entry. The
|
||||
|
||||
@@ -557,7 +557,7 @@ errout:
|
||||
* 2. All dots except the last deleted
|
||||
* 3. First 6 (uppercase) characters used as a base
|
||||
* 4. Then ~1. The number is increased if the file already exists in the
|
||||
* directory. If the number exeeds >10, then character stripped off the
|
||||
* directory. If the number exceeds >10, then character stripped off the
|
||||
* base.
|
||||
* 5. The extension is the first 3 uppercase chars of extension.
|
||||
*
|
||||
@@ -1084,7 +1084,7 @@ static int fat_findsfnentry(struct fat_mountpt_s *fs,
|
||||
* Name: fat_cmplfnchunk
|
||||
*
|
||||
* Description: There are 13 characters per LFN entry, broken up into three
|
||||
* chunks for characts 1-5, 6-11, and 12-13. This function will perform
|
||||
* chunks for characters 1-5, 6-11, and 12-13. This function will perform
|
||||
* the comparison of a single chunk.
|
||||
*
|
||||
****************************************************************************/
|
||||
@@ -1376,7 +1376,7 @@ static inline int fat_findlfnentry(struct fat_mountpt_s *fs,
|
||||
}
|
||||
|
||||
/* Bad news.. reset and continue with this entry (which is
|
||||
* probably not an LFN entry unless the file systen is
|
||||
* probably not an LFN entry unless the file system is
|
||||
* seriously corrupted.
|
||||
*/
|
||||
|
||||
@@ -1679,7 +1679,7 @@ static inline int fat_getsfname(uint8_t *direntry, char *buffer,
|
||||
|
||||
/* In this version, we never write 0xe5 in the directory filenames
|
||||
* (because we do not handle any character sets where 0xe5 is valid
|
||||
* in a filaname), but we could encounted this in a filesystem
|
||||
* in a filaname), but we could eencounter this in a filesystem
|
||||
* written by some other system
|
||||
*/
|
||||
|
||||
@@ -1760,7 +1760,7 @@ static inline int fat_getsfname(uint8_t *direntry, char *buffer,
|
||||
* Name: fat_getlfnchunk
|
||||
*
|
||||
* Description: There are 13 characters per LFN entry, broken up into three
|
||||
* chunks for characts 1-5, 6-11, and 12-13. This function will get the
|
||||
* chunks for characters 1-5, 6-11, and 12-13. This function will get the
|
||||
* file name characters from one chunk.
|
||||
*
|
||||
****************************************************************************/
|
||||
@@ -1977,7 +1977,7 @@ static int fat_putsfname(struct fat_mountpt_s *fs, struct fat_dirinfo_s *dirinfo
|
||||
* Name: fat_initlfname
|
||||
*
|
||||
* Description: There are 13 characters per LFN entry, broken up into three
|
||||
* chunks for characts 1-5, 6-11, and 12-13. This function will put the
|
||||
* chunks for characters 1-5, 6-11, and 12-13. This function will put the
|
||||
* 0xffff characters into one chunk.
|
||||
*
|
||||
****************************************************************************/
|
||||
@@ -2003,7 +2003,7 @@ static void fat_initlfname(uint8_t *chunk, int nchunk)
|
||||
* Name: fat_putlfnchunk
|
||||
*
|
||||
* Description: There are 13 characters per LFN entry, broken up into three
|
||||
* chunks for characts 1-5, 6-11, and 12-13. This function will put the
|
||||
* chunks for characters 1-5, 6-11, and 12-13. This function will put the
|
||||
* file name characters into one chunk.
|
||||
*
|
||||
****************************************************************************/
|
||||
@@ -2394,7 +2394,7 @@ int fat_finddirentry(struct fat_mountpt_s *fs, struct fat_dirinfo_s *dirinfo,
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
/* A return value of -ENOENT would mean that the path segement
|
||||
/* A return value of -ENOENT would mean that the path segment
|
||||
* was not found. Let's distinguish two cases: (1) the final
|
||||
* file was not found in the directory (-ENOENT), or (2) one
|
||||
* of the directory path segments does not exist (-ENOTDIR)
|
||||
@@ -2955,7 +2955,7 @@ int fat_remove(struct fat_mountpt_s *fs, const char *relpath, bool directory)
|
||||
subdirindex = (dirinfo.dir.fd_index & DIRSEC_NDXMASK(fs)) * DIR_SIZE;
|
||||
subdirentry = &fs->fs_buffer[subdirindex];
|
||||
|
||||
/* Is this the last entry in the direcory? */
|
||||
/* Is this the last entry in the directory? */
|
||||
|
||||
if (subdirentry[DIR_NAME] == DIR0_ALLEMPTY)
|
||||
{
|
||||
|
||||
@@ -319,7 +319,7 @@ void fat_putuint16(FAR uint8_t *ptr, uint16_t value16)
|
||||
|
||||
#ifdef CONFIG_ENDIAN_BIG
|
||||
/* If the target is big-endian then the bytes always have to be swapped so
|
||||
* that the representation is litle endian in the file system.
|
||||
* that the representation is little endian in the file system.
|
||||
*/
|
||||
|
||||
ptr[0] = val[1];
|
||||
@@ -345,7 +345,7 @@ void fat_putuint32(FAR uint8_t *ptr, uint32_t value32)
|
||||
|
||||
#ifdef CONFIG_ENDIAN_BIG
|
||||
/* If the target is big-endian then the bytes always have to be swapped so
|
||||
* that the representation is litle endian in the file system.
|
||||
* that the representation is little endian in the file system.
|
||||
*/
|
||||
|
||||
fat_putuint16(&ptr[0], val[1]);
|
||||
|
||||
+3
-3
@@ -77,7 +77,7 @@ static void _files_semtake(FAR struct filelist *list)
|
||||
* Description:
|
||||
* Close an inode (if open)
|
||||
*
|
||||
* Assumuptions:
|
||||
* Assumptions:
|
||||
* Caller holds the list semaphore because the file descriptor will be freed.
|
||||
*
|
||||
****************************************************************************/
|
||||
@@ -337,7 +337,7 @@ int files_allocate(FAR struct inode *inode, int oflags, off_t pos, int minfd)
|
||||
* Description:
|
||||
* Close an inode (if open)
|
||||
*
|
||||
* Assumuptions:
|
||||
* Assumptions:
|
||||
* Caller holds the list semaphore because the file descriptor will be freed.
|
||||
*
|
||||
****************************************************************************/
|
||||
@@ -372,7 +372,7 @@ int files_close(int fd)
|
||||
/****************************************************************************
|
||||
* Name: files_release
|
||||
*
|
||||
* Assumuptions:
|
||||
* Assumptions:
|
||||
* Similar to files_close(). Called only from open() logic on error
|
||||
* conditions.
|
||||
*
|
||||
|
||||
@@ -244,7 +244,7 @@ static int _inode_search(FAR struct inode_search_s *desc)
|
||||
int ret = -ENOENT;
|
||||
|
||||
/* Get the search path, skipping over the leading '/'. The leading '/' is
|
||||
* mandatory because only absolte paths are expected in this context.
|
||||
* mandatory because only absolute paths are expected in this context.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(desc != NULL && desc->path != NULL);
|
||||
|
||||
+2
-2
@@ -406,7 +406,7 @@ int files_allocate(FAR struct inode *inode, int oflags, off_t pos, int minfd);
|
||||
* Description:
|
||||
* Close an inode (if open)
|
||||
*
|
||||
* Assumuptions:
|
||||
* Assumptions:
|
||||
* Caller holds the list semaphore because the file descriptor will be freed.
|
||||
*
|
||||
****************************************************************************/
|
||||
@@ -416,7 +416,7 @@ int files_close(int fd);
|
||||
/****************************************************************************
|
||||
* Name: files_release
|
||||
*
|
||||
* Assumuptions:
|
||||
* Assumptions:
|
||||
* Similar to files_close(). Called only from open() logic on error
|
||||
* conditions.
|
||||
*
|
||||
|
||||
+1
-1
@@ -309,7 +309,7 @@ Here's an example of a file entry:
|
||||
(32 bits) file size = 256 KB (0x00040000)
|
||||
(12 bytes) name = largeavacado
|
||||
|
||||
00000000: 11 08 00 0c 1f 02 00 00 00 00 04 00 6c 61 72 67 ............larg
|
||||
00000000: 11 08 00 0c 1f 02 00 00 00 00 04 00 6c 61 72 67 ............large
|
||||
00000010: 65 61 76 61 63 61 64 6f eavacado
|
||||
```
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ int mq_close(mqd_t mqdes)
|
||||
FAR struct tcb_s *rtcb = (FAR struct tcb_s *)sched_self();
|
||||
int ret;
|
||||
|
||||
/* Lock the scheduler to prevent any asynchrounous task delete operation
|
||||
/* Lock the scheduler to prevent any asynchronous task delete operation
|
||||
* (unlikely).
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -547,7 +547,7 @@ struct READDIR3args
|
||||
*
|
||||
* File ID (8 bytes)
|
||||
* Name length (4 bytes)
|
||||
* Name string (varaiable size but in multiples of 4 bytes)
|
||||
* Name string (variable size but in multiples of 4 bytes)
|
||||
* Cookie (8 bytes)
|
||||
* next entry (4 bytes)
|
||||
*/
|
||||
|
||||
+3
-3
@@ -739,7 +739,7 @@ static int nfs_close(FAR struct file *filep)
|
||||
* free up all resources associated with the open file.
|
||||
*
|
||||
* First, find our file structure in the list of file structures
|
||||
* containted in the mount structure.
|
||||
* contained in the mount structure.
|
||||
*/
|
||||
|
||||
else
|
||||
@@ -1566,7 +1566,7 @@ static int nfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir)
|
||||
*
|
||||
* File ID (8 bytes)
|
||||
* Name length (4 bytes)
|
||||
* Name string (varaiable size but in multiples of 4 bytes)
|
||||
* Name string (variable size but in multiples of 4 bytes)
|
||||
* Cookie (8 bytes)
|
||||
* next entry (4 bytes)
|
||||
*/
|
||||
@@ -1659,7 +1659,7 @@ errout_with_semaphore:
|
||||
* Name: nfs_rewinddir
|
||||
*
|
||||
* Description:
|
||||
* Reset the directory traveral logic to the first entry in the open
|
||||
* Reset the directory traversal logic to the first entry in the open
|
||||
* directory.
|
||||
*
|
||||
* Returned Value:
|
||||
|
||||
+3
-3
@@ -156,7 +156,7 @@
|
||||
|
||||
/* Values for NXFFS inode state. Similar there are 2 (maybe 3) inode states:
|
||||
*
|
||||
* INODE_STATE_FILE - The inode is a valid usuable, file
|
||||
* INODE_STATE_FILE - The inode is a valid usable, file
|
||||
* INODE_STATE_DELETED - The inode has been deleted.
|
||||
* Other values - The inode is bad and has an invalid state.
|
||||
*
|
||||
@@ -921,7 +921,7 @@ int nxffs_wrextend(FAR struct nxffs_volume_s *volume,
|
||||
* On successful return the following are also valid:
|
||||
*
|
||||
* volume->ioblock - Read/write block number of the block containing the
|
||||
* candidate oject position
|
||||
* candidate object position
|
||||
* volume->iooffset - The offset in the block to the candidate object
|
||||
* position.
|
||||
* volume->froffset - Updated offset to the first free FLASH block after
|
||||
@@ -949,7 +949,7 @@ int nxffs_wrreserve(FAR struct nxffs_volume_s *volume, size_t size);
|
||||
* following settings (left by nxffs_wrreserve()):
|
||||
*
|
||||
* volume->ioblock - Read/write block number of the block containing the
|
||||
* candidate oject position
|
||||
* candidate object position
|
||||
* volume->iooffset - The offset in the block to the candidate object
|
||||
* position.
|
||||
*
|
||||
|
||||
@@ -1170,7 +1170,7 @@ int nxffs_close(FAR struct file *filep)
|
||||
ret = nxffs_wrclose(volume, (FAR struct nxffs_wrfile_s *)ofile);
|
||||
}
|
||||
|
||||
/* Release all resouces held by the open file */
|
||||
/* Release all resources held by the open file */
|
||||
|
||||
nxffs_freeofile(volume, ofile);
|
||||
}
|
||||
|
||||
@@ -741,7 +741,7 @@ int nxffs_wrextend(FAR struct nxffs_volume_s *volume,
|
||||
* On successful return the following are also valid:
|
||||
*
|
||||
* volume->ioblock - Read/write block number of the block containing the
|
||||
* candidate oject position
|
||||
* candidate object position
|
||||
* volume->iooffset - The offset in the block to the candidate object
|
||||
* position.
|
||||
* volume->froffset - Updated offset to the first free FLASH block after
|
||||
@@ -828,7 +828,7 @@ int nxffs_wrreserve(FAR struct nxffs_volume_s *volume, size_t size)
|
||||
* following settings (left by nxffs_wrreserve()):
|
||||
*
|
||||
* volume->ioblock - Read/write block number of the block containing the
|
||||
* candidate oject position
|
||||
* candidate object position
|
||||
* volume->iooffset - The offset in the block to the candidate object
|
||||
* position.
|
||||
*
|
||||
|
||||
@@ -292,7 +292,7 @@ const struct mountpt_operations procfs_operations =
|
||||
};
|
||||
|
||||
/* Level 0 contains the directory of active tasks in addition to other
|
||||
* statically registered entries with custom handlers. This strcture
|
||||
* statically registered entries with custom handlers. This structure
|
||||
* contains a snapshot of the active tasks when the directory is first
|
||||
* opened.
|
||||
*/
|
||||
|
||||
@@ -336,7 +336,7 @@ static int skel_dup(FAR const struct file *oldp, FAR struct file *newp)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
/* The copy the file attribtes from the old attributes to the new */
|
||||
/* The copy the file attribute from the old attributes to the new */
|
||||
|
||||
memcpy(newpriv, oldpriv, sizeof(struct skel_file_s));
|
||||
|
||||
@@ -376,7 +376,7 @@ static int skel_opendir(FAR const char *relpath, FAR struct fs_dirent_s *dir)
|
||||
|
||||
/* TODO: Initialize context specific data */
|
||||
|
||||
/* Initialze base structure components */
|
||||
/* Initialize base structure components */
|
||||
|
||||
level1->base.level = 1;
|
||||
level1->base.nentries = 0;
|
||||
@@ -444,7 +444,7 @@ static int skel_readdir(FAR struct fs_dirent_s *dir)
|
||||
ret = -ENOENT;
|
||||
}
|
||||
|
||||
/* We are tranversing a subdirectory of task attributes */
|
||||
/* We are traversing a subdirectory of task attributes */
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
* 2. Garbage collection can occur when a new sector is allocated or when
|
||||
* existing sector data is overwritten with new data. Thus, occasionally,
|
||||
* file writing may take longer than other times.
|
||||
* 3. The implementation curently does not track bad blocks on the device.
|
||||
* 3. The implementation currently does not track bad blocks on the device.
|
||||
* 4. There is no true wear-leveling implemented yet, though provesion have
|
||||
* been made to reserve logical sectors to allow it to be added using
|
||||
* a "sector aging" tracking mechanism.
|
||||
@@ -146,7 +146,7 @@
|
||||
|
||||
/* Values for SMART inode state.
|
||||
*
|
||||
* SMART_STATE_FILE - The inode is a valid usuable, file
|
||||
* SMART_STATE_FILE - The inode is a valid usable, file
|
||||
* INODE_STATE_DELETED - The inode has been deleted.
|
||||
* Other values - The inode is bad and has an invalid state.
|
||||
*
|
||||
|
||||
@@ -525,7 +525,7 @@ static int smartfs_dup(FAR const struct file *oldp, FAR struct file *newp)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
/* The copy the file attribtes from the old attributes to the new */
|
||||
/* The copy the file attribute from the old attributes to the new */
|
||||
|
||||
memcpy(newpriv, oldpriv, sizeof(struct smartfs_file_s));
|
||||
|
||||
|
||||
@@ -542,7 +542,7 @@ static ssize_t smartfs_read(FAR struct file *filep, char *buffer, size_t buflen)
|
||||
break;
|
||||
}
|
||||
|
||||
/* Read the curent sector into our buffer */
|
||||
/* Read the current sector into our buffer */
|
||||
|
||||
readwrite.logsector = sf->currsector;
|
||||
readwrite.offset = 0;
|
||||
@@ -1671,7 +1671,7 @@ static int smartfs_mkdir(struct inode *mountpt, const char *relpath, mode_t mode
|
||||
|
||||
if (parentdirsector == 0xffff)
|
||||
{
|
||||
/* Invalid entry in the path (non-existant dir segment) */
|
||||
/* Invalid entry in the path (non-existent dir segment) */
|
||||
|
||||
goto errout_with_semaphore;
|
||||
}
|
||||
@@ -1748,7 +1748,7 @@ int smartfs_rmdir(struct inode *mountpt, const char *relpath)
|
||||
|
||||
/* TODO: Need to check permissions? */
|
||||
|
||||
/* Check if the directory is emtpy */
|
||||
/* Check if the directory is empty */
|
||||
|
||||
ret = smartfs_countdirentries(fs, &entry);
|
||||
if (ret < 0)
|
||||
|
||||
@@ -113,7 +113,7 @@ Choosing the page size for the system involves many factors:
|
||||
- How fast must spiffs be
|
||||
- Other things impossible to find out
|
||||
|
||||
So, chosing the Optimal Page Size (tm) seems tricky, to say the least. Don't
|
||||
So, choosing the Optimal Page Size (tm) seems tricky, to say the least. Don't
|
||||
fret - there is no optimal page size. This varies from how the target will use
|
||||
spiffs. Use the golden rule:
|
||||
|
||||
|
||||
@@ -345,7 +345,7 @@
|
||||
|
||||
#define SPIFFS_PH_FLAG_NDXDELE (1<<6)
|
||||
|
||||
/* Check objid, only visit matching objec ids */
|
||||
/* Check objid, only visit matching object ids */
|
||||
|
||||
#define SPIFFS_VIS_CHECK_ID (1<<0)
|
||||
|
||||
|
||||
+3
-3
@@ -993,7 +993,7 @@ static int tmpfs_find_object(FAR struct tmpfs_s *fs,
|
||||
break;
|
||||
}
|
||||
|
||||
/* No, this was not the final segement of the relpath.
|
||||
/* No, this was not the final segment of the relpath.
|
||||
* We cannot continue the search if any of the intermediate
|
||||
* segments do no correspond to directories.
|
||||
*/
|
||||
@@ -1002,7 +1002,7 @@ static int tmpfs_find_object(FAR struct tmpfs_s *fs,
|
||||
return -ENOTDIR;
|
||||
}
|
||||
|
||||
/* Search this directory for the next segement. If we
|
||||
/* Search this directory for the next segment. If we
|
||||
* exit the loop, tdo will still refer to the parent
|
||||
* directory of to.
|
||||
*/
|
||||
@@ -1162,7 +1162,7 @@ static int tmpfs_statfs_callout(FAR struct tmpfs_directory_s *tdo,
|
||||
|
||||
DEBUGASSERT(to != NULL);
|
||||
|
||||
/* Accumulate statistics. Save the total memory allocted for this object. */
|
||||
/* Accumulate statistics. Save the total memory allocated for this object. */
|
||||
|
||||
tmpbuf->tsf_alloc += to->to_alloc;
|
||||
|
||||
|
||||
@@ -765,7 +765,7 @@ static int unionfs_unbind_child(FAR struct unionfs_mountpt_s *um)
|
||||
}
|
||||
else if (ret > 0)
|
||||
{
|
||||
/* REVISIT: This is bad if the file sysem cannot support a deferred
|
||||
/* REVISIT: This is bad if the file system cannot support a deferred
|
||||
* unmount. Ideally it would perform the unmount when the last file
|
||||
* is closed. But I don't think any file system do that.
|
||||
*/
|
||||
@@ -1834,7 +1834,7 @@ static int unionfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir)
|
||||
{
|
||||
/* There is something there!
|
||||
* REVISIT: We could allow files and directories to
|
||||
* have duplicat names.
|
||||
* have duplicate names.
|
||||
*/
|
||||
|
||||
return -ENOENT;
|
||||
@@ -1902,7 +1902,7 @@ static int unionfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir)
|
||||
{
|
||||
/* There is something there!
|
||||
* REVISIT: We could allow files and directories to
|
||||
* have duplicat names.
|
||||
* have duplicate names.
|
||||
*/
|
||||
|
||||
duplicate = true;
|
||||
|
||||
@@ -474,7 +474,7 @@ static ssize_t userfs_write(FAR struct file *filep, FAR const char *buffer,
|
||||
|
||||
if (buflen > priv->mxwrite)
|
||||
{
|
||||
return -E2BIG; /* No implememented yet */
|
||||
return -E2BIG; /* No implemented yet */
|
||||
}
|
||||
|
||||
/* Get exclusive access */
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@
|
||||
* Name: dup
|
||||
*
|
||||
* Description:
|
||||
* Clone a file or socket descriptor to an arbitray descriptor number
|
||||
* Clone a file or socket descriptor to an arbitrary descriptor number
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@
|
||||
#include "inode/inode.h"
|
||||
|
||||
/* This logic in this applies only when both socket and file descriptors are
|
||||
* in that case, this function descriminates which type of dup2 is being
|
||||
* in that case, this function discriminates which type of dup2 is being
|
||||
* performed.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -103,7 +103,7 @@ int file_dup(FAR struct file *filep, int minfd)
|
||||
* Name: fs_dupfd OR dup
|
||||
*
|
||||
* Description:
|
||||
* Clone a file descriptor 'fd' to an arbitray descriptor number (any value
|
||||
* Clone a file descriptor 'fd' to an arbitrary descriptor number (any value
|
||||
* greater than or equal to 'minfd'). If socket descriptors are
|
||||
* implemented, then this is called by dup() for the case of file
|
||||
* descriptors. If socket descriptors are not implemented, then this
|
||||
|
||||
+1
-1
@@ -65,7 +65,7 @@
|
||||
*
|
||||
* Input Parameters:
|
||||
* filep - Instance for struct file for the opened file.
|
||||
* cmd - Indentifies the operation to be performed.
|
||||
* cmd - Identifies the operation to be performed.
|
||||
* ap - Variable argument following the command.
|
||||
*
|
||||
* Returned Value:
|
||||
|
||||
@@ -89,7 +89,7 @@ ssize_t readlink(FAR const char *path, FAR char *buf, size_t bufsize)
|
||||
|
||||
DEBUGASSERT(path != NULL && buf != NULL && bufsize > 0);
|
||||
|
||||
/* Find the inode that includes this path (without derefencing the final)
|
||||
/* Find the inode that includes this path (without dereferencing the final)
|
||||
* symbolic link node.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -204,7 +204,7 @@ ssize_t nx_write(int fd, FAR const void *buf, size_t nbytes)
|
||||
* buf is outside your accessible address space.
|
||||
* EFBIG
|
||||
* An attempt was made to write a file that exceeds the implementation
|
||||
* defined maximum file size or the process' file size limit, or
|
||||
* defined maximum file size or the process's file size limit, or
|
||||
* to write at a position past the maximum allowed offset.
|
||||
* EINTR
|
||||
* The call was interrupted by a signal before any data was written.
|
||||
|
||||
Reference in New Issue
Block a user