Skip to content

Commit 1bf9ded

Browse files
pennamfacchinm
authored andcommitted
MCUboot:PORTENTA_H7_M7:Remove LittleFS format, reformat, rename
1 parent def06ca commit 1bf9ded

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

storage/filesystem/littlefs/include/littlefs/LittleFileSystem.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ class LittleFileSystem : public mbed::FileSystem {
6565

6666
virtual ~LittleFileSystem();
6767

68+
#if !defined(TARGET_PORTENTA_H7_M7) || !defined(MCUBOOT_BOOTLOADER_BUILD)
6869
/** Format a block device with the LittleFileSystem.
6970
*
7071
* The block device to format should be mounted when this function is called.
@@ -94,6 +95,7 @@ class LittleFileSystem : public mbed::FileSystem {
9495
lfs_size_t block_size = MBED_LFS_BLOCK_SIZE,
9596
lfs_size_t lookahead = MBED_LFS_LOOKAHEAD);
9697

98+
#endif
9799
/** Mount a file system to a block device.
98100
*
99101
* @param bd Block device to mount to.
@@ -107,6 +109,7 @@ class LittleFileSystem : public mbed::FileSystem {
107109
*/
108110
virtual int unmount();
109111

112+
#if !defined(TARGET_PORTENTA_H7_M7) || !defined(MCUBOOT_BOOTLOADER_BUILD)
110113
/** Reformat a file system. Results in an empty and mounted file system.
111114
*
112115
* @param bd
@@ -118,6 +121,7 @@ class LittleFileSystem : public mbed::FileSystem {
118121
* @return 0 on success, negative error code on failure
119122
*/
120123
virtual int reformat(mbed::BlockDevice *bd);
124+
#endif
121125

122126
/** Remove a file from the file system.
123127
*
@@ -126,13 +130,15 @@ class LittleFileSystem : public mbed::FileSystem {
126130
*/
127131
virtual int remove(const char *path);
128132

133+
#if !defined(TARGET_PORTENTA_H7_M7) || !defined(MCUBOOT_BOOTLOADER_BUILD)
129134
/** Rename a file in the file system.
130135
*
131136
* @param path The name of the file to rename.
132137
* @param newpath The name to rename it to.
133138
* @return 0 on success, negative error code on failure
134139
*/
135140
virtual int rename(const char *path, const char *newpath);
141+
#endif
136142

137143
/** Store information about the file in a stat structure
138144
*

storage/filesystem/littlefs/source/LittleFileSystem.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ int LittleFileSystem::unmount()
241241
return res;
242242
}
243243

244+
#if !defined(TARGET_PORTENTA_H7_M7) || !defined(MCUBOOT_BOOTLOADER_BUILD)
244245
int LittleFileSystem::format(BlockDevice *bd,
245246
lfs_size_t read_size, lfs_size_t prog_size,
246247
lfs_size_t block_size, lfs_size_t lookahead)
@@ -338,6 +339,7 @@ int LittleFileSystem::reformat(BlockDevice *bd)
338339
_mutex.unlock();
339340
return 0;
340341
}
342+
#endif
341343

342344
int LittleFileSystem::remove(const char *filename)
343345
{
@@ -349,6 +351,7 @@ int LittleFileSystem::remove(const char *filename)
349351
return lfs_toerror(err);
350352
}
351353

354+
#if !defined(TARGET_PORTENTA_H7_M7) || !defined(MCUBOOT_BOOTLOADER_BUILD)
352355
int LittleFileSystem::rename(const char *oldname, const char *newname)
353356
{
354357
_mutex.lock();
@@ -358,6 +361,7 @@ int LittleFileSystem::rename(const char *oldname, const char *newname)
358361
_mutex.unlock();
359362
return lfs_toerror(err);
360363
}
364+
#endif
361365

362366
int LittleFileSystem::mkdir(const char *name, mode_t mode)
363367
{

0 commit comments

Comments
 (0)