diff -urN pspsdk-2493-orig/tools/pack-pbp.c pspsdk-2493/tools/pack-pbp.c --- pspsdk-2493-orig/tools/pack-pbp.c 2010-04-26 14:52:59 +0900 +++ pspsdk-2493/tools/pack-pbp.c 2010-04-26 15:31:11 +0900 @@ -53,13 +53,23 @@ int maxbuffer = 16 * 1024 * 1024; int main(int argc, char *argv[]) { int loop0, result; + int verbose = 0; FILE *infile; FILE *outfile; int filesize[8]; + + // Parse and remove "-v" (verbose) flag if present + if (argc > 1 && strcmp(argv[1], "-v") == 0) { + verbose = 1; + if (argc > 2) { + memmove(&argv[1], &argv[2], (argc-2) * sizeof(*argv)); + } + argc--; + } // Check for the correct number of arguments if (argc != 10) { - printf("USAGE: %s \n", argv[0]); + printf("USAGE: %s [-v] \n", argv[0]); return -1; } @@ -129,8 +139,10 @@ void *buffer; int readsize; - // Print out the file details - printf("[%d] %10d bytes | %s\n", loop0, filesize[loop0], argv[2 + loop0]); + // Print out the file details (only in verbose mode) + if (verbose) { + printf("[%d] %10d bytes | %s\n", loop0, filesize[loop0], argv[2 + loop0]); + } // If this file is empty, skip it if (!filesize[loop0]) continue;