mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
esp32<|s2|s3>_board_spiflash: Fix error message about SmartFS init
The SmartFS partition needs to be formatted before being mounted. Otherwise, it would throw an error message. The error message now contains a suggestion to format the partition when such an error is detected.
This commit is contained in:
parent
6c4b30736e
commit
908bac55f3
3 changed files with 18 additions and 0 deletions
|
|
@ -204,6 +204,12 @@ static int setup_smartfs(int smartn, struct mtd_dev_s *mtd,
|
|||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to mount the FS volume: %d\n", ret);
|
||||
if (ret == -ENODEV)
|
||||
{
|
||||
fwarn("Smartfs seems unformatted. "
|
||||
"Did you run 'mksmartfs /dev/smart%d'?\n", smartn);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,6 +115,12 @@ static int setup_smartfs(int smartn, struct mtd_dev_s *mtd,
|
|||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to mount the FS volume: %d\n", ret);
|
||||
if (ret == -ENODEV)
|
||||
{
|
||||
fwarn("Smartfs seems unformatted. "
|
||||
"Did you run 'mksmartfs /dev/smart%d'?\n", smartn);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,6 +106,12 @@ static int setup_smartfs(int smartn, struct mtd_dev_s *mtd,
|
|||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: Failed to mount the FS volume: %d\n", ret);
|
||||
if (ret == -ENODEV)
|
||||
{
|
||||
fwarn("Smartfs seems unformatted. "
|
||||
"Did you run 'mksmartfs /dev/smart%d'?\n", smartn);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue