mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-10 16:35:22 +00:00
reword and fix littlefs define
This commit is contained in:
@ -8,9 +8,7 @@
|
||||
#include "../ota/ota.h"
|
||||
#include "../hal/hal_wifi.h"
|
||||
#include "../hal/hal_flashVars.h"
|
||||
#ifdef ENABLE_LITTLEFS
|
||||
#include "../littlefs/our_lfs.h"
|
||||
#endif
|
||||
#include "lwip/sockets.h"
|
||||
|
||||
#if PLATFORM_XR809
|
||||
@ -81,7 +79,7 @@ static int http_rest_get_seriallog(http_request_t* request);
|
||||
static int http_rest_post_logconfig(http_request_t* request);
|
||||
static int http_rest_get_logconfig(http_request_t* request);
|
||||
|
||||
#ifdef ENABLE_LITTLEFS
|
||||
#if ENABLE_LITTLEFS
|
||||
static int http_rest_get_lfs_delete(http_request_t* request);
|
||||
static int http_rest_get_lfs_file(http_request_t* request);
|
||||
static int http_rest_post_lfs_file(http_request_t* request);
|
||||
@ -152,7 +150,7 @@ static int http_rest_get(http_request_t* request) {
|
||||
return http_rest_get_seriallog(request);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_LITTLEFS
|
||||
#if ENABLE_LITTLEFS
|
||||
if (!strcmp(request->url, "api/fsblock")) {
|
||||
uint32_t newsize = CFG_GetLFS_Size();
|
||||
uint32_t newstart = (LFS_BLOCKS_END - newsize);
|
||||
@ -173,7 +171,7 @@ static int http_rest_get(http_request_t* request) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_LITTLEFS
|
||||
#if ENABLE_LITTLEFS
|
||||
if (!strncmp(request->url, "api/lfs/", 8)) {
|
||||
return http_rest_get_lfs_file(request);
|
||||
}
|
||||
@ -254,7 +252,7 @@ static int http_rest_post(http_request_t* request) {
|
||||
}
|
||||
|
||||
|
||||
#ifdef ENABLE_LITTLEFS
|
||||
#if ENABLE_LITTLEFS
|
||||
if (!strcmp(request->url, "api/fsblock")) {
|
||||
if (lfs_present()) {
|
||||
release_lfs();
|
||||
@ -328,7 +326,7 @@ static int http_rest_app(http_request_t* request) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_LITTLEFS
|
||||
#if ENABLE_LITTLEFS
|
||||
|
||||
int EndsWith(const char* str, const char* suffix)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user