static int verbose = 0;
static int print_security = 0;
+static int full_print = 0;
/*
* These definitions are for the in-memory registry structure.
int terminal, int vals)
{
- /*if (terminal)*/ fprintf(stdout, "[%s%s]\n", path, name);
+ if (full_print || terminal) fprintf(stdout, "[%s%s]\n", path, name);
return 1;
}
void usage(void)
{
- fprintf(stderr, "Usage: editreg [-v] [-p] [-k] [-s] [-c <command-file>] <registryfile>\n");
+ fprintf(stderr, "Usage: editreg [-f] [-v] [-p] [-k] [-s] [-c <command-file>] <registryfile>\n");
fprintf(stderr, "Version: 0.1\n\n");
fprintf(stderr, "\n\t-v\t sets verbose mode");
+ fprintf(stderr, "\n\t-f\t sets full print mode where non-terminals are printed");
fprintf(stderr, "\n\t-p\t prints the registry");
fprintf(stderr, "\n\t-s\t prints security descriptors");
fprintf(stderr, "\n\t-c <command-file>\t specifies a command file");
* Now, process the arguments
*/
- while ((opt = getopt(argc, argv, "spvko:c:")) != EOF) {
+ while ((opt = getopt(argc, argv, "fspvko:c:")) != EOF) {
switch (opt) {
case 'c':
commands = 1;
regf_opt += 2;
break;
+ case 'f':
+ full_print = 1;
+ regf_opt++;
+ break;
+
case 'o':
out_file_name = optarg;
regf_opt += 2;
case 's':
print_security++;
+ full_print++;
regf_opt++;
break;