mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-09 05:45:25 +00:00
Add LittleFS for BL602 (#1159)
* Add little fs for bl602 * check for Lfs before creating file
This commit is contained in:
@ -534,6 +534,14 @@ static int http_rest_post_lfs_file(http_request_t* request) {
|
||||
// create if it does not exist
|
||||
init_lfs(1);
|
||||
|
||||
if (!lfs_present()) {
|
||||
request->responseCode = 400;
|
||||
http_setup(request, httpMimeTypeText);
|
||||
poststr(request, "LittleFS is not abailable");
|
||||
poststr(request, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
fpath = os_malloc(strlen(request->url) - strlen("api/lfs/") + 1);
|
||||
file = os_malloc(sizeof(lfs_file_t));
|
||||
memset(file, 0, sizeof(lfs_file_t));
|
||||
|
||||
Reference in New Issue
Block a user