linguini1 commented on code in PR #19166:
URL: https://github.com/apache/nuttx/pull/19166#discussion_r3443323901
##########
fs/littlefs/lfs_vfs.c:
##########
@@ -1504,7 +1701,7 @@ static int littlefs_bind(FAR struct inode *driver, FAR
const void *data,
{
/* Auto format the device if -o autoformat */
- if (ret != -EFAULT || !autoformat)
+ if (ret != -EFAULT || !data || strcmp(data, "autoformat"))
Review Comment:
This `strcmp` call just checks that the string does NOT contain
"autoformat". I highly recommend putting back the old parsing logic unless you
plan to properly test all options.
##########
fs/littlefs/lfs_vfs.c:
##########
@@ -1462,8 +1657,10 @@ static int littlefs_bind(FAR struct inode *driver, FAR
const void *data,
CONFIG_FS_LITTLEFS_READ_SIZE_FACTOR;
fs->cfg.prog_size = fs->geo.blocksize *
CONFIG_FS_LITTLEFS_PROGRAM_SIZE_FACTOR;
- fs->cfg.block_size = fs->geo.erasesize * block_size_factor;
- fs->cfg.block_count = fs->geo.neraseblocks / block_size_factor;
Review Comment:
Why are you removing the configurable `block_size_factor` option?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]