Implement storedevs, prepare to port littlefs
This commit is contained in:
15
kernel/util/util.c
Normal file
15
kernel/util/util.c
Normal file
@ -0,0 +1,15 @@
|
||||
#include "util.h"
|
||||
|
||||
char *util_get_filename(char *path) {
|
||||
char *lastslash = path;
|
||||
char *p = path;
|
||||
|
||||
while (*p) {
|
||||
if (*p == '/') {
|
||||
lastslash = p + 1;
|
||||
}
|
||||
p++;
|
||||
}
|
||||
return lastslash;
|
||||
}
|
||||
|
Reference in New Issue
Block a user