mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
fix standalone warnings
This commit is contained in:
parent
5f1ff72f7c
commit
8160131119
11 changed files with 48 additions and 40 deletions
|
@ -68,7 +68,7 @@
|
||||||
|
|
||||||
#define HF_14ASNIFF_LOGFILE "hf_14asniff.trc"
|
#define HF_14ASNIFF_LOGFILE "hf_14asniff.trc"
|
||||||
|
|
||||||
void DownloadTraceInstructions(void) {
|
static void DownloadTraceInstructions(void) {
|
||||||
Dbprintf("");
|
Dbprintf("");
|
||||||
Dbprintf("To get the trace from flash and display it:");
|
Dbprintf("To get the trace from flash and display it:");
|
||||||
Dbprintf("1. mem spiffs dump o "HF_14ASNIFF_LOGFILE" f trace.trc");
|
Dbprintf("1. mem spiffs dump o "HF_14ASNIFF_LOGFILE" f trace.trc");
|
||||||
|
|
|
@ -41,7 +41,7 @@ from the client to view the stored quadlets.
|
||||||
#define HF_BOG_LOGFILE "hf_bog.log"
|
#define HF_BOG_LOGFILE "hf_bog.log"
|
||||||
|
|
||||||
// This is actually copied from SniffIso14443a
|
// This is actually copied from SniffIso14443a
|
||||||
void RAMFUNC SniffAndStore(uint8_t param) {
|
static void RAMFUNC SniffAndStore(uint8_t param) {
|
||||||
|
|
||||||
iso14443a_setup(FPGA_HF_ISO14443A_SNIFFER);
|
iso14443a_setup(FPGA_HF_ISO14443A_SNIFFER);
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,12 @@ static const uint8_t is_hex[] = {
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Note: inlining this function would fail with -Os
|
||||||
|
#ifdef __OPTIMIZE_SIZE__
|
||||||
|
static uint64_t hex2i(const char *s) {
|
||||||
|
#else
|
||||||
static inline uint64_t hex2i(const char *s) {
|
static inline uint64_t hex2i(const char *s) {
|
||||||
|
#endif
|
||||||
uint64_t val = 0;
|
uint64_t val = 0;
|
||||||
if (s == NULL || s[0] == 0)
|
if (s == NULL || s[0] == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -198,14 +203,14 @@ MFC1KSchema InfiHexact = {.name = "Infineon/Hexact",
|
||||||
|
|
||||||
int total_schemas = 0;
|
int total_schemas = 0;
|
||||||
|
|
||||||
void add_schema(MFC1KSchema *p, MFC1KSchema a, int *schemas_counter) {
|
static void add_schema(MFC1KSchema *p, MFC1KSchema a, int *schemas_counter) {
|
||||||
if (*schemas_counter < MAX_SCHEMAS) {
|
if (*schemas_counter < MAX_SCHEMAS) {
|
||||||
p[*schemas_counter] = a;
|
p[*schemas_counter] = a;
|
||||||
*schemas_counter += 1;
|
*schemas_counter += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
void delete_schema(MFC1KSchema *p, int *schemas_counter, int index) {
|
static void delete_schema(MFC1KSchema *p, int *schemas_counter, int index) {
|
||||||
if (*schemas_counter > 0 && index < *schemas_counter && index > -1) {
|
if (*schemas_counter > 0 && index < *schemas_counter && index > -1) {
|
||||||
int last_index = *schemas_counter - 1;
|
int last_index = *schemas_counter - 1;
|
||||||
for (int i = index; i < last_index; i++) {
|
for (int i = index; i < last_index; i++) {
|
||||||
|
@ -214,23 +219,23 @@ void delete_schema(MFC1KSchema *p, int *schemas_counter, int index) {
|
||||||
*schemas_counter -= 1;
|
*schemas_counter -= 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
void cjSetCursFRight(void) {
|
static void cjSetCursFRight(void) {
|
||||||
vtsend_cursor_position(NULL, 98, (currfline));
|
vtsend_cursor_position(NULL, 98, (currfline));
|
||||||
currfline++;
|
currfline++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cjSetCursRight(void) {
|
static void cjSetCursRight(void) {
|
||||||
vtsend_cursor_position(NULL, 59, (currline));
|
vtsend_cursor_position(NULL, 59, (currline));
|
||||||
currline++;
|
currline++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cjSetCursLeft(void) {
|
static void cjSetCursLeft(void) {
|
||||||
vtsend_cursor_position(NULL, 0, (curlline));
|
vtsend_cursor_position(NULL, 0, (curlline));
|
||||||
curlline++;
|
curlline++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cjTabulize(void) { DbprintfEx(FLAG_RAWPRINT, "\t\t\t"); }
|
static void cjTabulize(void) { DbprintfEx(FLAG_RAWPRINT, "\t\t\t"); }
|
||||||
|
|
||||||
/*
|
/*
|
||||||
void cjPrintKey(uint64_t key, uint8_t *foundKey, uint16_t sectorNo, uint8_t type) {
|
void cjPrintKey(uint64_t key, uint8_t *foundKey, uint16_t sectorNo, uint8_t type) {
|
||||||
|
@ -240,7 +245,7 @@ foundKey[5]); cjSetCursRight(); DbprintfEx(FLAG_NEWLINE, "SEC: %02x | KEY : %s |
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char *ReadSchemasFromSPIFFS(char *filename) {
|
static char *ReadSchemasFromSPIFFS(char *filename) {
|
||||||
SpinOff(0);
|
SpinOff(0);
|
||||||
|
|
||||||
int changed = rdv40_spiffs_lazy_mount();
|
int changed = rdv40_spiffs_lazy_mount();
|
||||||
|
@ -255,7 +260,7 @@ char *ReadSchemasFromSPIFFS(char *filename) {
|
||||||
return (char *)mem;
|
return (char *)mem;
|
||||||
}
|
}
|
||||||
|
|
||||||
void add_schemas_from_json_in_spiffs(char *filename) {
|
static void add_schemas_from_json_in_spiffs(char *filename) {
|
||||||
|
|
||||||
char *jsonfile = ReadSchemasFromSPIFFS((char *)filename);
|
char *jsonfile = ReadSchemasFromSPIFFS((char *)filename);
|
||||||
|
|
||||||
|
@ -275,7 +280,7 @@ void add_schemas_from_json_in_spiffs(char *filename) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReadLastTagFromFlash(void) {
|
static void ReadLastTagFromFlash(void) {
|
||||||
SpinOff(0);
|
SpinOff(0);
|
||||||
LED_A_ON();
|
LED_A_ON();
|
||||||
LED_B_ON();
|
LED_B_ON();
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void DownloadLogInstructions(void) {
|
static void DownloadLogInstructions(void) {
|
||||||
Dbprintf("");
|
Dbprintf("");
|
||||||
Dbprintf("[=] List all dumps from flash:");
|
Dbprintf("[=] List all dumps from flash:");
|
||||||
Dbprintf("[=] " _YELLOW_("-") " mem spiffs tree");
|
Dbprintf("[=] " _YELLOW_("-") " mem spiffs tree");
|
||||||
|
@ -53,7 +53,7 @@ void DownloadLogInstructions(void) {
|
||||||
Dbprintf("[=] " _YELLOW_("-") " mem spiffs dump o hf-legic-UID-dump.bin f hf-legic-UID-dump.bin");
|
Dbprintf("[=] " _YELLOW_("-") " mem spiffs dump o hf-legic-UID-dump.bin f hf-legic-UID-dump.bin");
|
||||||
}
|
}
|
||||||
|
|
||||||
void save_dump_to_file(legic_card_select_t *p_card) {
|
static void save_dump_to_file(legic_card_select_t *p_card) {
|
||||||
|
|
||||||
#ifdef WITH_FLASH
|
#ifdef WITH_FLASH
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include "ticks.h"
|
#include "ticks.h"
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
#include "BigBuf.h"
|
#include "BigBuf.h"
|
||||||
|
#include "commonutil.h"
|
||||||
|
|
||||||
#define MAX_IND 16 // 4 LEDs - 2^4 combinations
|
#define MAX_IND 16 // 4 LEDs - 2^4 combinations
|
||||||
#define CLOCK 64 //for 125kHz
|
#define CLOCK 64 //for 125kHz
|
||||||
|
@ -34,7 +35,7 @@ void ModInfo(void) {
|
||||||
DbpString(" LF EM4100 simulator standalone mode");
|
DbpString(" LF EM4100 simulator standalone mode");
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t ReversQuads(uint64_t bits) {
|
static uint64_t ReversQuads(uint64_t bits) {
|
||||||
uint64_t result = 0;
|
uint64_t result = 0;
|
||||||
for (int i = 0; i < 16; i++) {
|
for (int i = 0; i < 16; i++) {
|
||||||
result += ((bits >> (60 - 4 * i)) & 0xf) << (4 * i);
|
result += ((bits >> (60 - 4 * i)) & 0xf) << (4 * i);
|
||||||
|
@ -42,14 +43,14 @@ uint64_t ReversQuads(uint64_t bits) {
|
||||||
return result >> 24;
|
return result >> 24;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FillBuff(uint8_t bit) {
|
static void FillBuff(uint8_t bit) {
|
||||||
memset(bba + buflen, bit, CLOCK / 2);
|
memset(bba + buflen, bit, CLOCK / 2);
|
||||||
buflen += (CLOCK / 2);
|
buflen += (CLOCK / 2);
|
||||||
memset(bba + buflen, bit ^ 1, CLOCK / 2);
|
memset(bba + buflen, bit ^ 1, CLOCK / 2);
|
||||||
buflen += (CLOCK / 2);
|
buflen += (CLOCK / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConstructEM410xEmulBuf(uint64_t id) {
|
static void ConstructEM410xEmulBuf(uint64_t id) {
|
||||||
|
|
||||||
int i, j, binary[4], parity[4];
|
int i, j, binary[4], parity[4];
|
||||||
buflen = 0;
|
buflen = 0;
|
||||||
|
@ -70,7 +71,7 @@ void ConstructEM410xEmulBuf(uint64_t id) {
|
||||||
FillBuff(0);
|
FillBuff(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LED_Slot(int i) {
|
static void LED_Slot(int i) {
|
||||||
LEDsoff();
|
LEDsoff();
|
||||||
if (slots_count > 4) {
|
if (slots_count > 4) {
|
||||||
LED(i % MAX_IND, 0); //binary indication for slots_count > 4
|
LED(i % MAX_IND, 0); //binary indication for slots_count > 4
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
#include "BigBuf.h"
|
#include "BigBuf.h"
|
||||||
#include "spiffs.h"
|
#include "spiffs.h"
|
||||||
|
#include "commonutil.h"
|
||||||
|
|
||||||
#ifdef WITH_FLASH
|
#ifdef WITH_FLASH
|
||||||
#include "flashmem.h"
|
#include "flashmem.h"
|
||||||
|
@ -47,7 +48,7 @@ void ModInfo(void) {
|
||||||
DbpString(" LF EM4100 read/write/clone mode");
|
DbpString(" LF EM4100 read/write/clone mode");
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t ReversQuads(uint64_t bits) {
|
static uint64_t ReversQuads(uint64_t bits) {
|
||||||
uint64_t result = 0;
|
uint64_t result = 0;
|
||||||
for (int i = 0; i < 16; i++) {
|
for (int i = 0; i < 16; i++) {
|
||||||
result += ((bits >> (60 - 4 * i)) & 0xf) << (4 * i);
|
result += ((bits >> (60 - 4 * i)) & 0xf) << (4 * i);
|
||||||
|
@ -55,14 +56,14 @@ uint64_t ReversQuads(uint64_t bits) {
|
||||||
return result >> 24;
|
return result >> 24;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FillBuff(uint8_t bit) {
|
static void FillBuff(uint8_t bit) {
|
||||||
memset(bba + buflen, bit, CLOCK / 2);
|
memset(bba + buflen, bit, CLOCK / 2);
|
||||||
buflen += (CLOCK / 2);
|
buflen += (CLOCK / 2);
|
||||||
memset(bba + buflen, bit ^ 1, CLOCK / 2);
|
memset(bba + buflen, bit ^ 1, CLOCK / 2);
|
||||||
buflen += (CLOCK / 2);
|
buflen += (CLOCK / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConstructEM410xEmulBuf(uint64_t id) {
|
static void ConstructEM410xEmulBuf(uint64_t id) {
|
||||||
|
|
||||||
int i, j, binary[4], parity[4];
|
int i, j, binary[4], parity[4];
|
||||||
buflen = 0;
|
buflen = 0;
|
||||||
|
@ -83,7 +84,7 @@ void ConstructEM410xEmulBuf(uint64_t id) {
|
||||||
FillBuff(0);
|
FillBuff(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LED_Slot(int i) {
|
static void LED_Slot(int i) {
|
||||||
LEDsoff();
|
LEDsoff();
|
||||||
if (slots_count > 4) {
|
if (slots_count > 4) {
|
||||||
LED(i % MAX_IND, 0); //binary indication, usefully for slots_count > 4
|
LED(i % MAX_IND, 0); //binary indication, usefully for slots_count > 4
|
||||||
|
@ -92,7 +93,7 @@ void LED_Slot(int i) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FlashLEDs(uint32_t speed, uint8_t times) {
|
static void FlashLEDs(uint32_t speed, uint8_t times) {
|
||||||
for (int i = 0; i < times * 2; i++) {
|
for (int i = 0; i < times * 2; i++) {
|
||||||
LED_A_INV();
|
LED_A_INV();
|
||||||
LED_B_INV();
|
LED_B_INV();
|
||||||
|
@ -103,9 +104,9 @@ void FlashLEDs(uint32_t speed, uint8_t times) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WITH_FLASH
|
#ifdef WITH_FLASH
|
||||||
void SaveIDtoFlash(int addr, uint64_t id) {
|
static void SaveIDtoFlash(int addr, uint64_t id) {
|
||||||
uint8_t bt[5];
|
uint8_t bt[5];
|
||||||
char *filename = "emdump";
|
const char *filename = "emdump";
|
||||||
rdv40_spiffs_mount();
|
rdv40_spiffs_mount();
|
||||||
for (int i = 0; i < 5; i++) {
|
for (int i = 0; i < 5; i++) {
|
||||||
bt[4 - i] = (uint8_t)(id >> 8 * i & 0xff);
|
bt[4 - i] = (uint8_t)(id >> 8 * i & 0xff);
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
#define LF_HIDCOLLECT_LOGFILE "lf_hidcollect.log"
|
#define LF_HIDCOLLECT_LOGFILE "lf_hidcollect.log"
|
||||||
|
|
||||||
|
|
||||||
void DownloadLogInstructions(void) {
|
static void DownloadLogInstructions(void) {
|
||||||
Dbprintf("");
|
Dbprintf("");
|
||||||
Dbprintf("[=] To get the logfile from flash and display it:");
|
Dbprintf("[=] To get the logfile from flash and display it:");
|
||||||
Dbprintf("[=] " _YELLOW_("1.") " mem spiffs dump o "LF_HIDCOLLECT_LOGFILE" f "LF_HIDCOLLECT_LOGFILE);
|
Dbprintf("[=] " _YELLOW_("1.") " mem spiffs dump o "LF_HIDCOLLECT_LOGFILE" f "LF_HIDCOLLECT_LOGFILE);
|
||||||
|
@ -64,7 +64,7 @@ void DownloadLogInstructions(void) {
|
||||||
|
|
||||||
bool log_exists;
|
bool log_exists;
|
||||||
|
|
||||||
void append(uint8_t *entry, size_t entry_len) {
|
static void append(uint8_t *entry, size_t entry_len) {
|
||||||
|
|
||||||
LED_B_ON();
|
LED_B_ON();
|
||||||
if (log_exists == false) {
|
if (log_exists == false) {
|
||||||
|
@ -76,7 +76,7 @@ void append(uint8_t *entry, size_t entry_len) {
|
||||||
LED_B_OFF();
|
LED_B_OFF();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t IceEM410xdemod(void) {
|
static uint32_t IceEM410xdemod(void) {
|
||||||
|
|
||||||
uint8_t *dest = BigBuf_get_addr();
|
uint8_t *dest = BigBuf_get_addr();
|
||||||
size_t idx = 0;
|
size_t idx = 0;
|
||||||
|
@ -128,7 +128,7 @@ uint32_t IceEM410xdemod(void) {
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t IceAWIDdemod(void) {
|
static uint32_t IceAWIDdemod(void) {
|
||||||
|
|
||||||
uint8_t *dest = BigBuf_get_addr();
|
uint8_t *dest = BigBuf_get_addr();
|
||||||
size_t size = MIN(12800, BigBuf_max_traceLen());
|
size_t size = MIN(12800, BigBuf_max_traceLen());
|
||||||
|
@ -180,7 +180,7 @@ uint32_t IceAWIDdemod(void) {
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t IceIOdemod(void) {
|
static uint32_t IceIOdemod(void) {
|
||||||
|
|
||||||
int dummyIdx = 0;
|
int dummyIdx = 0;
|
||||||
uint8_t version = 0, facilitycode = 0;
|
uint8_t version = 0, facilitycode = 0;
|
||||||
|
@ -224,7 +224,7 @@ uint32_t IceIOdemod(void) {
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t IceHIDDemod(void) {
|
static uint32_t IceHIDDemod(void) {
|
||||||
|
|
||||||
int dummyIdx = 0;
|
int dummyIdx = 0;
|
||||||
|
|
||||||
|
|
|
@ -400,20 +400,20 @@ int rdv40_spiffs_lazy_mount_rollback(int changed) {
|
||||||
// statement or some function taking function parameters
|
// statement or some function taking function parameters
|
||||||
// TODO : forbid writing to a filename which already exists as lnk !
|
// TODO : forbid writing to a filename which already exists as lnk !
|
||||||
// TODO : forbid writing to a filename.lnk which already exists without lnk !
|
// TODO : forbid writing to a filename.lnk which already exists without lnk !
|
||||||
int rdv40_spiffs_write(char *filename, uint8_t *src, uint32_t size, RDV40SpiFFSSafetyLevel level) {
|
int rdv40_spiffs_write(const char *filename, uint8_t *src, uint32_t size, RDV40SpiFFSSafetyLevel level) {
|
||||||
RDV40_SPIFFS_SAFE_FUNCTION(
|
RDV40_SPIFFS_SAFE_FUNCTION(
|
||||||
write_to_spiffs(filename, src, size);
|
write_to_spiffs(filename, src, size);
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
int rdv40_spiffs_append(char *filename, uint8_t *src, uint32_t size, RDV40SpiFFSSafetyLevel level) {
|
int rdv40_spiffs_append(const char *filename, uint8_t *src, uint32_t size, RDV40SpiFFSSafetyLevel level) {
|
||||||
RDV40_SPIFFS_SAFE_FUNCTION(
|
RDV40_SPIFFS_SAFE_FUNCTION(
|
||||||
append_to_spiffs(filename, src, size);
|
append_to_spiffs(filename, src, size);
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo integrate reading symlinks transparently
|
// todo integrate reading symlinks transparently
|
||||||
int rdv40_spiffs_read(char *filename, uint8_t *dst, uint32_t size, RDV40SpiFFSSafetyLevel level) {
|
int rdv40_spiffs_read(const char *filename, uint8_t *dst, uint32_t size, RDV40SpiFFSSafetyLevel level) {
|
||||||
RDV40_SPIFFS_SAFE_FUNCTION(
|
RDV40_SPIFFS_SAFE_FUNCTION(
|
||||||
read_from_spiffs(filename, dst, size);
|
read_from_spiffs(filename, dst, size);
|
||||||
)
|
)
|
||||||
|
|
|
@ -37,8 +37,8 @@ int rdv40_spiffs_check(void);
|
||||||
int rdv40_spiffs_lazy_unmount(void);
|
int rdv40_spiffs_lazy_unmount(void);
|
||||||
int rdv40_spiffs_lazy_mount(void);
|
int rdv40_spiffs_lazy_mount(void);
|
||||||
int rdv40_spiffs_lazy_mount_rollback(int changed);
|
int rdv40_spiffs_lazy_mount_rollback(int changed);
|
||||||
int rdv40_spiffs_write(char *filename, uint8_t *src, uint32_t size, RDV40SpiFFSSafetyLevel level);
|
int rdv40_spiffs_write(const char *filename, uint8_t *src, uint32_t size, RDV40SpiFFSSafetyLevel level);
|
||||||
int rdv40_spiffs_read(char *filename, uint8_t *dst, uint32_t size, RDV40SpiFFSSafetyLevel level);
|
int rdv40_spiffs_read(const char *filename, uint8_t *dst, uint32_t size, RDV40SpiFFSSafetyLevel level);
|
||||||
int rdv40_spiffs_rename(char *old_filename, char *new_filename, RDV40SpiFFSSafetyLevel level);
|
int rdv40_spiffs_rename(char *old_filename, char *new_filename, RDV40SpiFFSSafetyLevel level);
|
||||||
int rdv40_spiffs_remove(char *filename, RDV40SpiFFSSafetyLevel level);
|
int rdv40_spiffs_remove(char *filename, RDV40SpiFFSSafetyLevel level);
|
||||||
int rdv40_spiffs_read_as_symlink(char *filename, uint8_t *dst, uint32_t size, RDV40SpiFFSSafetyLevel level);
|
int rdv40_spiffs_read_as_symlink(char *filename, uint8_t *dst, uint32_t size, RDV40SpiFFSSafetyLevel level);
|
||||||
|
@ -53,7 +53,7 @@ void rdv40_spiffs_safe_print_fsinfo(void);
|
||||||
int rdv40_spiffs_make_symlink(char *linkdest, char *filename, RDV40SpiFFSSafetyLevel level);
|
int rdv40_spiffs_make_symlink(char *linkdest, char *filename, RDV40SpiFFSSafetyLevel level);
|
||||||
void append_to_spiffs(const char *filename, uint8_t *src, uint32_t size);
|
void append_to_spiffs(const char *filename, uint8_t *src, uint32_t size);
|
||||||
int rdv40_spiffs_copy(char *src, char *dst, RDV40SpiFFSSafetyLevel level);
|
int rdv40_spiffs_copy(char *src, char *dst, RDV40SpiFFSSafetyLevel level);
|
||||||
int rdv40_spiffs_append(char *filename, uint8_t *src, uint32_t size, RDV40SpiFFSSafetyLevel level);
|
int rdv40_spiffs_append(const char *filename, uint8_t *src, uint32_t size, RDV40SpiFFSSafetyLevel level);
|
||||||
int rdv40_spiffs_stat(char *filename, uint32_t *buf, RDV40SpiFFSSafetyLevel level);
|
int rdv40_spiffs_stat(char *filename, uint32_t *buf, RDV40SpiFFSSafetyLevel level);
|
||||||
uint32_t size_in_spiffs(const char *filename);
|
uint32_t size_in_spiffs(const char *filename);
|
||||||
int exists_in_spiffs(const char *filename);
|
int exists_in_spiffs(const char *filename);
|
||||||
|
|
|
@ -247,7 +247,7 @@ int strncmp(const char *s1, const char *s2, size_t n) {
|
||||||
|
|
||||||
|
|
||||||
#define isspace(a) __extension__ ({ unsigned char bb__isspace = (a) - 9; bb__isspace == (' ' - 9) || bb__isspace <= (13 - 9); })
|
#define isspace(a) __extension__ ({ unsigned char bb__isspace = (a) - 9; bb__isspace == (' ' - 9) || bb__isspace <= (13 - 9); })
|
||||||
/*
|
|
||||||
unsigned long strtoul(const char *p, char **out_p, int base) {
|
unsigned long strtoul(const char *p, char **out_p, int base) {
|
||||||
unsigned long v = 0;
|
unsigned long v = 0;
|
||||||
|
|
||||||
|
@ -319,7 +319,6 @@ long strtol(const char *p, char **out_p, int base) {
|
||||||
if (out_p) *out_p = (char *)p;
|
if (out_p) *out_p = (char *)p;
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
char c_tolower(int c) {
|
char c_tolower(int c) {
|
||||||
// (int)a = 97, (int)A = 65
|
// (int)a = 97, (int)A = 65
|
||||||
|
|
|
@ -33,6 +33,8 @@ char *strrchr(const char *s, int c);
|
||||||
size_t strcspn(const char *s1, const char *s2);
|
size_t strcspn(const char *s1, const char *s2);
|
||||||
char *strpbrk(const char *s1, const char *s2);
|
char *strpbrk(const char *s1, const char *s2);
|
||||||
int strncmp(const char *s1, const char *s2, size_t n);
|
int strncmp(const char *s1, const char *s2, size_t n);
|
||||||
|
unsigned long strtoul(const char *p, char **out_p, int base);
|
||||||
|
long strtol(const char *p, char **out_p, int base);
|
||||||
char c_tolower(int c);
|
char c_tolower(int c);
|
||||||
char c_isprint(unsigned char c);
|
char c_isprint(unsigned char c);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue