mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 00:32:38 +01:00 
			
		
		
		
	Merge pull request #614 from nnayo/fix_no_malloc_2
don't use lfs_file_open() when LFS_NO_MALLOC is set
This commit is contained in:
		
							
								
								
									
										2
									
								
								lfs.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								lfs.c
									
									
									
									
									
								
							| @@ -5104,6 +5104,7 @@ int lfs_removeattr(lfs_t *lfs, const char *path, uint8_t type) { | ||||
| } | ||||
| #endif | ||||
|  | ||||
| #ifndef LFS_NO_MALLOC | ||||
| int lfs_file_open(lfs_t *lfs, lfs_file_t *file, const char *path, int flags) { | ||||
|     int err = LFS_LOCK(lfs->cfg); | ||||
|     if (err) { | ||||
| @@ -5119,6 +5120,7 @@ int lfs_file_open(lfs_t *lfs, lfs_file_t *file, const char *path, int flags) { | ||||
|     LFS_UNLOCK(lfs->cfg); | ||||
|     return err; | ||||
| } | ||||
| #endif | ||||
|  | ||||
| int lfs_file_opencfg(lfs_t *lfs, lfs_file_t *file, | ||||
|         const char *path, int flags, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user