Day2 of restructuring/rewriting

This commit is contained in:
Such Meme, Many Skill
2020-03-18 23:58:32 +01:00
parent ff618bc285
commit 9d36f741d9
30 changed files with 981 additions and 1503 deletions

View File

@@ -1,8 +1,6 @@
#include <string.h>
#include "../../mem/heap.h"
#include "../gfx/gfxutils.h"
#include "../fs.h"
#include "../io.h"
#include "../emmc.h"
#include "../../utils/types.h"
#include "../../libs/fatfs/ff.h"
@@ -13,6 +11,7 @@
#include "../../storage/emummc.h"
#include "script.h"
#include "../common/common.h"
#include "../fs/fsactions.h"
#include <stdlib.h>
@@ -81,15 +80,15 @@ void Part_Delete(){
}
void Part_DeleteRecursive(){
errcode = del_recursive(args[0]);
errcode = fsact_del_recursive(args[0]);
}
void Part_Copy(){
errcode = copy(args[0], args[1], true, false);
errcode = fsact_copy(args[0], args[1], COPY_MODE_PRINT);
}
void Part_RecursiveCopy(){
errcode = copy_recursive(args[0], args[1]);
errcode = fsact_copy_recursive(args[0], args[1]);
}
void Part_MakeFolder(){
@@ -186,7 +185,7 @@ void ParseScript(char* path){
res = f_open(&in, path, FA_READ | FA_OPEN_EXISTING);
if (res != FR_OK){
gfx_errprint("ParseScript", res, 1);
gfx_errDisplay("ParseScript", res, 1);
return;
}

View File

@@ -11,9 +11,8 @@
#include "../../utils/sprintf.h"
#include "../../soc/fuse.h"
#include "../emmc.h"
#include "../fs.h"
#include "../io.h"
#include "../common/common.h"
#include "../fs/fsactions.h"
extern bool sd_mount();
extern void sd_unmount();
@@ -126,7 +125,7 @@ int dumpfirmware(int mmc){
else
sprintf(syspath, "%s/%s", path, fno.fname);
ret = copy(syspath, sdpath, false, false);
ret = fsact_copy(syspath, sdpath, 0);
gfx_printf("%d %s\r", ++amount, fno.fname);
@@ -156,7 +155,7 @@ void dumpusersaves(int mmc){
SWAPCOLOR(COLOR_GREEN);
res = copy_recursive("emmc:/save", "sd:/tegraexplorer");
res = fsact_copy_recursive("emmc:/save", "sd:/tegraexplorer");
SWAPCOLOR(COLOR_ORANGE);
gfx_printf("\rResult copy_recursive() %d\n\n", res);

View File

@@ -1,7 +1,9 @@
#include <string.h>
#include "utils.h"
#include "../common/common.h"
#include "../gfx/menu.h"
#include "../../storage/emummc.h"
#include "../../mem/heap.h"
int utils_mmcMenu(){
int res;
@@ -10,4 +12,10 @@ int utils_mmcMenu(){
return menu_make(utils_mmcChoice, 3, "-- Choose MMC --");
else
return SYSMMC;
}
void utils_copystring(const char *in, char **out){
int len = strlen(in) + 1;
*out = (char *) malloc (len);
strcpy(*out, in);
}

View File

@@ -1,3 +1,4 @@
#pragma once
int utils_mmcMenu();
int utils_mmcMenu();
void utils_copystring(const char *in, char **out);