From 7d4f1a4092f3326564feecfe1a35ff9fd13dbcbf Mon Sep 17 00:00:00 2001 From: applestash Date: Sat, 28 Jun 2014 18:43:22 +1000 Subject: [PATCH] cleaned romfs_binary.c --- makerom/romfs_binary.c | 44 +++--------------------------------------- 1 file changed, 3 insertions(+), 41 deletions(-) diff --git a/makerom/romfs_binary.c b/makerom/romfs_binary.c index b087f20..b9cc1f0 100644 --- a/makerom/romfs_binary.c +++ b/makerom/romfs_binary.c @@ -58,7 +58,7 @@ int PrepareBuildRomFsBinary(ncch_settings *ncchset, romfs_buildctx *ctx) FilterRomFS(fs_raw,ctx->fs,filter_criteria); // free unfiltered FS - fs_PrintDir(fs_raw,0); + //fs_PrintDir(fs_raw,0); //printf("free discarded file ptrs\n"); fs_FreeFiles(fs_raw); // All important FPs have been moved with FilterRomFS, so only un-wanted FPs are closed here //printf("free structs in fs_raw\n"); @@ -75,7 +75,7 @@ int PrepareBuildRomFsBinary(ncch_settings *ncchset, romfs_buildctx *ctx) // Print Filtered FS //printf("print filtered FS\n"); - fs_PrintDir(ctx->fs,0); + //fs_PrintDir(ctx->fs,0); //printf("predict romfs size\n"); CalcRomfsSize(ctx); @@ -469,42 +469,4 @@ void GenIvfcHashTree(romfs_buildctx *ctx) } return; -} - -/* -int main(int argc, char **argv) -{ - if(argc!=3){ - if(argc == 2) - return old_main(argc,argv); - printf("usage: %s \n",argv[0]); - return -1; - } - - romfs_buildctx *ctx = calloc(1,sizeof(romfs_buildctx)); - //memset(&ctx,0,sizeof(romfs_buildctx)); - PrepareRomfsBuild(NULL, ctx, argv[1]); - - if(ctx->romfsSize){ - ctx->output = calloc(1,ctx->romfsSize); - - int ret = RomfsBuild(ctx); - if(ret!=0) return -1; - - FILE *romfs = fopen(argv[2],"wb"); - fwrite(ctx->output,ctx->romfsSize,1,romfs); - fclose(romfs); - - //printf("free output ptr\n"); - free(ctx->output); - } - - //printf("free output\n"); - FreeRomfsCtx(ctx); - //printf("free ctx\n"); - free(ctx); - - //printf("return\n"); - return 0; -} -*/ \ No newline at end of file +} \ No newline at end of file