mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08: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:
committed by
Xiang Xiao
parent
6c4b30736e
commit
908bac55f3
@@ -204,6 +204,12 @@ static int setup_smartfs(int smartn, struct mtd_dev_s *mtd,
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
ferr("ERROR: Failed to mount the FS volume: %d\n", ret);
|
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;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,6 +115,12 @@ static int setup_smartfs(int smartn, struct mtd_dev_s *mtd,
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
ferr("ERROR: Failed to mount the FS volume: %d\n", ret);
|
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;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,6 +106,12 @@ static int setup_smartfs(int smartn, struct mtd_dev_s *mtd,
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
ferr("ERROR: Failed to mount the FS volume: %d\n", ret);
|
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;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user