format llfs
This commit is contained in:
@@ -7,17 +7,16 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#define LOGGER_LEVEL_WARN
|
#define LOGGER_LEVEL_WARN
|
||||||
#include "log.h"
|
|
||||||
#include "llfs.h"
|
#include "llfs.h"
|
||||||
|
#include "log.h"
|
||||||
|
|
||||||
extern struct llfs_data_file *llfs_root;
|
extern struct llfs_data_file* llfs_root;
|
||||||
const char* TAG = "llfs";
|
const char* TAG = "llfs";
|
||||||
|
|
||||||
|
|
||||||
// TODO: Implement file extension filter
|
// TODO: Implement file extension filter
|
||||||
size_t llfs_file_list(llfs_file_t *file_list, size_t max_files, char* filter) {
|
size_t llfs_file_list(llfs_file_t* file_list, size_t max_files, char* filter) {
|
||||||
size_t file_count = 0;
|
size_t file_count = 0;
|
||||||
const struct llfs_data_file *file = llfs_root;
|
const struct llfs_data_file* file = llfs_root;
|
||||||
|
|
||||||
LOG_DEBUG(TAG, "Getting file list with filter: %s", filter);
|
LOG_DEBUG(TAG, "Getting file list with filter: %s", filter);
|
||||||
|
|
||||||
@@ -33,15 +32,15 @@ size_t llfs_file_list(llfs_file_t *file_list, size_t max_files, char* filter) {
|
|||||||
return file_count;
|
return file_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
llfs_file_t *llfs_file_open(const char *name) {
|
llfs_file_t* llfs_file_open(const char* name) {
|
||||||
const struct llfs_data_file *file = llfs_root;
|
const struct llfs_data_file* file = llfs_root;
|
||||||
|
|
||||||
LOG_DEBUG(TAG, "Opening file: %s", name);
|
LOG_DEBUG(TAG, "Opening file: %s", name);
|
||||||
|
|
||||||
while (file != NULL) {
|
while (file != NULL) {
|
||||||
if (strcmp(file->name, name) == 0) {
|
if (strcmp(file->name, name) == 0) {
|
||||||
LOG_DEBUG(TAG, "File found: %s, size: %d", file->name, file->len);
|
LOG_DEBUG(TAG, "File found: %s, size: %d", file->name, file->len);
|
||||||
return (llfs_file_t *) file;
|
return (llfs_file_t*)file;
|
||||||
}
|
}
|
||||||
file = file->next;
|
file = file->next;
|
||||||
}
|
}
|
||||||
@@ -49,4 +48,3 @@ llfs_file_t *llfs_file_open(const char *name) {
|
|||||||
LOG_DEBUG(TAG, "File not found: %s", name);
|
LOG_DEBUG(TAG, "File not found: %s", name);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user