ssn-installer/src/errorAndExit.c

18 lines
1.3 KiB
C

#include <stdio.h>
#include <stdlib.h>
#include "errorAndExit.h"
void errorAndExit() {
fprintf(stderr, "\nUsage:\n");
fprintf(stderr, " ./ssn-installer --disk main.z01 --offset 456 --size 1000 [--keys 123,456,789] [--previous oldfile.tor]\n");
fprintf(stderr, "Options:\n");
fprintf(stderr, " -d, --disk: The path to the disk file that contains the file we want to extract.\n");
fprintf(stderr, " -o, --offset: The offset into the disk, given in bytes, where the local file header of the file we want to extract starts.\n");
fprintf(stderr, " -s, --size: The stored size of the file we want to extract (= the compressed size). After inflation, the file will likely be bigger than this.\n");
fprintf(stderr, " -k, --keys: Optionally, the three decryption keys used to decrypt the file before inflation.\n");
fprintf(stderr, " -p, --previous: Optionally, the location of the previous version of this file, in case this disk only contains the xdelta3 differences and not an actual file.\n");
fprintf(stderr, " -t, --target: The path where the extracted file is saved to. If not specified, the file is outputted to stdout.\n");
fprintf(stderr, " -l, --limit: The maximum disk write speed in bytes per second, or unlimited if set to 0. Defaults to 30 MB/s if not specified.\n");
exit(1);
}