mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 08:42:40 +01:00 
			
		
		
		
	Merge pull request #635 from mikee47/fix/spelling-errors
Fix spelling errors
This commit is contained in:
		| @@ -80,7 +80,7 @@ int lfs_filebd_read(const struct lfs_config *cfg, lfs_block_t block, | |||||||
|     LFS_ASSERT(size % cfg->read_size == 0); |     LFS_ASSERT(size % cfg->read_size == 0); | ||||||
|     LFS_ASSERT(block < cfg->block_count); |     LFS_ASSERT(block < cfg->block_count); | ||||||
|  |  | ||||||
|     // zero for reproducability (in case file is truncated) |     // zero for reproducibility (in case file is truncated) | ||||||
|     if (bd->cfg->erase_value != -1) { |     if (bd->cfg->erase_value != -1) { | ||||||
|         memset(buffer, bd->cfg->erase_value, size); |         memset(buffer, bd->cfg->erase_value, size); | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -32,7 +32,7 @@ int lfs_rambd_createcfg(const struct lfs_config *cfg, | |||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     // zero for reproducability? |     // zero for reproducibility? | ||||||
|     if (bd->cfg->erase_value != -1) { |     if (bd->cfg->erase_value != -1) { | ||||||
|         memset(bd->buffer, bd->cfg->erase_value, |         memset(bd->buffer, bd->cfg->erase_value, | ||||||
|                 cfg->block_size * cfg->block_count); |                 cfg->block_size * cfg->block_count); | ||||||
|   | |||||||
							
								
								
									
										4
									
								
								lfs.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								lfs.c
									
									
									
									
									
								
							| @@ -1462,7 +1462,7 @@ static int lfs_dir_alloc(lfs_t *lfs, lfs_mdir_t *dir) { | |||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     // zero for reproducability in case initial block is unreadable |     // zero for reproducibility in case initial block is unreadable | ||||||
|     dir->rev = 0; |     dir->rev = 0; | ||||||
|  |  | ||||||
|     // rather than clobbering one of the blocks we just pretend |     // rather than clobbering one of the blocks we just pretend | ||||||
| @@ -4086,7 +4086,7 @@ static int lfs_fs_relocate(lfs_t *lfs, | |||||||
|             lfs_fs_prepmove(lfs, 0x3ff, NULL); |             lfs_fs_prepmove(lfs, 0x3ff, NULL); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         // replace bad pair, either we clean up desync, or no desync occured |         // replace bad pair, either we clean up desync, or no desync occurred | ||||||
|         lfs_pair_tole32(newpair); |         lfs_pair_tole32(newpair); | ||||||
|         err = lfs_dir_commit(lfs, &parent, LFS_MKATTRS( |         err = lfs_dir_commit(lfs, &parent, LFS_MKATTRS( | ||||||
|                 {LFS_MKTAG_IF(moveid != 0x3ff, |                 {LFS_MKTAG_IF(moveid != 0x3ff, | ||||||
|   | |||||||
							
								
								
									
										14
									
								
								lfs.h
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								lfs.h
									
									
									
									
									
								
							| @@ -159,34 +159,34 @@ struct lfs_config { | |||||||
|     // information to the block device operations |     // information to the block device operations | ||||||
|     void *context; |     void *context; | ||||||
|  |  | ||||||
|     // Read a region in a block. Negative error codes are propogated |     // Read a region in a block. Negative error codes are propagated | ||||||
|     // to the user. |     // to the user. | ||||||
|     int (*read)(const struct lfs_config *c, lfs_block_t block, |     int (*read)(const struct lfs_config *c, lfs_block_t block, | ||||||
|             lfs_off_t off, void *buffer, lfs_size_t size); |             lfs_off_t off, void *buffer, lfs_size_t size); | ||||||
|  |  | ||||||
|     // Program a region in a block. The block must have previously |     // Program a region in a block. The block must have previously | ||||||
|     // been erased. Negative error codes are propogated to the user. |     // been erased. Negative error codes are propagated to the user. | ||||||
|     // May return LFS_ERR_CORRUPT if the block should be considered bad. |     // May return LFS_ERR_CORRUPT if the block should be considered bad. | ||||||
|     int (*prog)(const struct lfs_config *c, lfs_block_t block, |     int (*prog)(const struct lfs_config *c, lfs_block_t block, | ||||||
|             lfs_off_t off, const void *buffer, lfs_size_t size); |             lfs_off_t off, const void *buffer, lfs_size_t size); | ||||||
|  |  | ||||||
|     // Erase a block. A block must be erased before being programmed. |     // Erase a block. A block must be erased before being programmed. | ||||||
|     // The state of an erased block is undefined. Negative error codes |     // The state of an erased block is undefined. Negative error codes | ||||||
|     // are propogated to the user. |     // are propagated to the user. | ||||||
|     // May return LFS_ERR_CORRUPT if the block should be considered bad. |     // May return LFS_ERR_CORRUPT if the block should be considered bad. | ||||||
|     int (*erase)(const struct lfs_config *c, lfs_block_t block); |     int (*erase)(const struct lfs_config *c, lfs_block_t block); | ||||||
|  |  | ||||||
|     // Sync the state of the underlying block device. Negative error codes |     // Sync the state of the underlying block device. Negative error codes | ||||||
|     // are propogated to the user. |     // are propagated to the user. | ||||||
|     int (*sync)(const struct lfs_config *c); |     int (*sync)(const struct lfs_config *c); | ||||||
|  |  | ||||||
| #ifdef LFS_THREADSAFE | #ifdef LFS_THREADSAFE | ||||||
|     // Lock the underlying block device. Negative error codes |     // Lock the underlying block device. Negative error codes | ||||||
|     // are propogated to the user. |     // are propagated to the user. | ||||||
|     int (*lock)(const struct lfs_config *c); |     int (*lock)(const struct lfs_config *c); | ||||||
|  |  | ||||||
|     // Unlock the underlying block device. Negative error codes |     // Unlock the underlying block device. Negative error codes | ||||||
|     // are propogated to the user. |     // are propagated to the user. | ||||||
|     int (*unlock)(const struct lfs_config *c); |     int (*unlock)(const struct lfs_config *c); | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| @@ -485,7 +485,7 @@ int lfs_stat(lfs_t *lfs, const char *path, struct lfs_info *info); | |||||||
| // Returns the size of the attribute, or a negative error code on failure. | // Returns the size of the attribute, or a negative error code on failure. | ||||||
| // Note, the returned size is the size of the attribute on disk, irrespective | // Note, the returned size is the size of the attribute on disk, irrespective | ||||||
| // of the size of the buffer. This can be used to dynamically allocate a buffer | // of the size of the buffer. This can be used to dynamically allocate a buffer | ||||||
| // or check for existance. | // or check for existence. | ||||||
| lfs_ssize_t lfs_getattr(lfs_t *lfs, const char *path, | lfs_ssize_t lfs_getattr(lfs_t *lfs, const char *path, | ||||||
|         uint8_t type, void *buffer, lfs_size_t size); |         uint8_t type, void *buffer, lfs_size_t size); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -565,7 +565,7 @@ class TestSuite: | |||||||
|                     path=self.path)) |                     path=self.path)) | ||||||
|                 mk.write('\n') |                 mk.write('\n') | ||||||
|  |  | ||||||
|             # add truely global defines globally |             # add truly global defines globally | ||||||
|             for k, v in sorted(self.defines.items()): |             for k, v in sorted(self.defines.items()): | ||||||
|                 mk.write('%s.test: override CFLAGS += -D%s=%r\n' |                 mk.write('%s.test: override CFLAGS += -D%s=%r\n' | ||||||
|                     % (self.path, k, v)) |                     % (self.path, k, v)) | ||||||
| @@ -656,7 +656,7 @@ def main(**args): | |||||||
|         for path in glob.glob(testpath): |         for path in glob.glob(testpath): | ||||||
|             suites.append(TestSuite(path, classes, defines, filter, **args)) |             suites.append(TestSuite(path, classes, defines, filter, **args)) | ||||||
|  |  | ||||||
|     # sort for reproducability |     # sort for reproducibility | ||||||
|     suites = sorted(suites) |     suites = sorted(suites) | ||||||
|  |  | ||||||
|     # generate permutations |     # generate permutations | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user