diff options
author | Jeremy Allison <jra@samba.org> | 2001-03-26 23:13:02 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-03-26 23:13:02 +0000 |
commit | 1452c2d8c4a2124e4c97bb51a1e58bcfda620ef0 (patch) | |
tree | c988c7a9424838a16e0d49bf37c8eb37922921c0 /source3/utils/testparm.c | |
parent | 4e35283a8b2c4b816b7aec821c719378a1ef10a6 (diff) | |
download | samba-1452c2d8c4a2124e4c97bb51a1e58bcfda620ef0.tar.gz samba-1452c2d8c4a2124e4c97bb51a1e58bcfda620ef0.tar.xz samba-1452c2d8c4a2124e4c97bb51a1e58bcfda620ef0.zip |
Fix from Ryo Kawahara <rkawa@lbe.co.jp> to make SWAT correctly write and smb.conf
file in utf8.
Jeremy.
(This used to be commit 42052d6079479452aa43eb37ad3d679d28337779)
Diffstat (limited to 'source3/utils/testparm.c')
-rw-r--r-- | source3/utils/testparm.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c index dcf114bc91..20f36fcffe 100644 --- a/source3/utils/testparm.c +++ b/source3/utils/testparm.c @@ -146,6 +146,7 @@ static void usage(char *pname) printf("\t-s Suppress prompt for enter\n"); printf("\t-h Print usage\n"); printf("\t-L servername Set %%L macro to servername\n"); + printf("\t-t encoding Print parameters with encoding\n"); printf("\tconfigfilename Configuration file to test\n"); printf("\thostname hostIP. Hostname and Host IP address to test\n"); printf("\t against \"host allow\" and \"host deny\"\n"); @@ -163,6 +164,9 @@ int main(int argc, char *argv[]) int s; BOOL silent_mode = False; int ret = 0; + pstring term_code; + + *term_code = 0; TimeInit(); @@ -170,7 +174,7 @@ int main(int argc, char *argv[]) charset_initialise(); - while ((opt = getopt(argc, argv,"shL:")) != EOF) { + while ((opt = getopt(argc, argv,"shL:t:")) != EOF) { switch (opt) { case 's': silent_mode = True; @@ -182,6 +186,9 @@ int main(int argc, char *argv[]) usage(argv[0]); exit(0); break; + case 't': + pstrcpy(term_code,optarg); + break; default: printf("Incorrect program usage\n"); usage(argv[0]); @@ -250,13 +257,16 @@ Level II oplocks can only be set if oplocks are also set.\n", } } + if (*term_code) + interpret_coding_system(term_code); + if (argc < 3) { if (!silent_mode) { printf("Press enter to see a dump of your service definitions\n"); fflush(stdout); getc(stdin); } - lp_dump(stdout,True, lp_numservices()); + lp_dump(stdout,True, lp_numservices(), _dos_to_unix); } if (argc >= 3) { |