use path_append for setting directories is several settings

sprintf, strcpy, memccpy can all just go thru path_append
with the added benefit of some path sanitizing too

Change-Id: I33510b56a364b8b3a0b06f2ff14b76491f6e3870
This commit is contained in:
William Wilgus 2024-03-31 22:08:55 -04:00
parent 47784a777e
commit 1dc22c7241
7 changed files with 23 additions and 22 deletions

View file

@ -33,6 +33,7 @@
#include "storage.h"
#include "rolo.h"
#include "rbpaths.h"
#include "pathfuncs.h"
//#define LOGF_ENABLE
#include "logf.h"
@ -94,9 +95,9 @@ int rolo_load(const char* filename)
logf("system: %s", buf);
system(buf);
snprintf(buf, sizeof(buf), "%s/%s", EXECDIR, BOOTFILE);
path_append(buf, EXECDIR, BOOTFILE, sizeof(buf));
#else
snprintf(buf, sizeof(buf), "%s/%s", EXECDIR, filename);
path_append(buf, EXECDIR, filename, sizeof(buf));
#endif
logf("execl: %s", buf);