summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-08-21 20:29:11 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-08-21 20:29:11 +0000
commit16caf06f6026f8104f4a6701993cbd560e2cd74d (patch)
tree26ff35941865de97b55376951114c996a5041b03 /source3/utils
parentd3aa76cef528a15571cade12ebdd10973f4ca579 (diff)
downloadsamba-16caf06f6026f8104f4a6701993cbd560e2cd74d.tar.gz
samba-16caf06f6026f8104f4a6701993cbd560e2cd74d.tar.bz2
samba-16caf06f6026f8104f4a6701993cbd560e2cd74d.zip
This is like jht's (abortive) patch for showing only non-default testparm
options. Andrew Bartlett (This used to be commit 4cd822d9e4e5f35a47b0837bfa73c8a457e6cc85)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/testparm.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c
index 3086019467..852472073b 100644
--- a/source3/utils/testparm.c
+++ b/source3/utils/testparm.c
@@ -171,7 +171,7 @@ via the %%o substitution. With encrypted passwords this is not possible.\n", lp_
return ret;
}
-int main(int argc, char *argv[])
+int main(int argc, const char *argv[])
{
extern char *optarg;
extern int optind;
@@ -185,17 +185,19 @@ int main(int argc, char *argv[])
static char *new_local_machine = NULL;
const char *cname;
const char *caddr;
+ static int show_defaults;
struct poptOption long_options[] = {
POPT_AUTOHELP
{"suppress-prompt", 's', POPT_ARG_VAL, &silent_mode, 1, "Suppress prompt for enter"},
+ {"verbose", 'v', POPT_ARG_NONE, &show_defaults, 1, "Show default options too"},
{"server", 'L',POPT_ARG_STRING, &new_local_machine, 0, "Set %%L macro to servername\n"},
{"encoding", 't', POPT_ARG_STRING, &term_code, 0, "Print parameters with encoding"},
{0,0,0,0}
};
- pc = poptGetContext(NULL, argc, (const char **) argv, long_options,
- POPT_CONTEXT_KEEP_FIRST);
+ pc = poptGetContext(NULL, argc, argv, long_options,
+ POPT_CONTEXT_KEEP_FIRST);
while((opt = poptGetNextOpt(pc)) != -1);
@@ -276,7 +278,7 @@ int main(int argc, char *argv[])
fflush(stdout);
getc(stdin);
}
- lp_dump(stdout,True, lp_numservices());
+ lp_dump(stdout, show_defaults, lp_numservices());
}
if(cname && caddr){