kopia lustrzana https://github.com/micropython/micropython
cc3200: Create /flash/cert folder if it doesn't exist.
rodzic
e955089da0
commit
753a8e8bc4
|
@ -337,17 +337,20 @@ STATIC void mptask_init_sflash_filesystem (void) {
|
||||||
// It is set to the internal flash filesystem by default.
|
// It is set to the internal flash filesystem by default.
|
||||||
f_chdrive("/flash");
|
f_chdrive("/flash");
|
||||||
|
|
||||||
// create /flash/sys and /flash/lib if they don't exist
|
// create /flash/sys, /flash/lib and /flash/cert if they don't exist
|
||||||
if (FR_OK != f_chdir ("/flash/sys")) {
|
if (FR_OK != f_chdir ("/flash/sys")) {
|
||||||
res = f_mkdir("/flash/sys");
|
res = f_mkdir("/flash/sys");
|
||||||
}
|
}
|
||||||
if (FR_OK != f_chdir ("/flash/lib")) {
|
if (FR_OK != f_chdir ("/flash/lib")) {
|
||||||
res = f_mkdir("/flash/lib");
|
res = f_mkdir("/flash/lib");
|
||||||
}
|
}
|
||||||
|
if (FR_OK != f_chdir ("/flash/cert")) {
|
||||||
|
res = f_mkdir("/flash/cert");
|
||||||
|
}
|
||||||
|
|
||||||
f_chdir ("/flash");
|
f_chdir ("/flash");
|
||||||
|
|
||||||
// Make sure we have a /flash/boot.py. Create it if needed.
|
// make sure we have a /flash/boot.py. Create it if needed.
|
||||||
res = f_stat("/flash/boot.py", &fno);
|
res = f_stat("/flash/boot.py", &fno);
|
||||||
if (res == FR_OK) {
|
if (res == FR_OK) {
|
||||||
if (fno.fattrib & AM_DIR) {
|
if (fno.fattrib & AM_DIR) {
|
||||||
|
|
Ładowanie…
Reference in New Issue