Added -W workgroup command line option.
authorTim Potter <tpot@samba.org>
Mon, 22 May 2000 23:38:56 +0000 (23:38 +0000)
committerTim Potter <tpot@samba.org>
Mon, 22 May 2000 23:38:56 +0000 (23:38 +0000)
Added call to codepage_initialise().
(This used to be commit fcb8e2fbe2deabfc2f8d7e69dd23dca9740c6dc1)

source3/utils/locktest.c
source3/utils/masktest.c

index 475e20fa6631ce546466c02213ad7295756b4a7d..482167a45ae2627617a68306a88d2802b8fee496 100644 (file)
@@ -454,6 +454,7 @@ static void usage(void)
 "Usage:\n\
   locktest //server1/share1 //server2/share2 [options..]\n\
   options:\n\
+        -W workgroup\n\
         -U user%%pass\n\
         -s seed\n\
         -o numops\n\
@@ -497,6 +498,7 @@ static void usage(void)
 
        TimeInit();
        charset_initialise();
+       codepage_initialise(lp_client_code_page());
 
        lp_load(servicesf,True,False,False);
        load_interfaces();
@@ -507,7 +509,7 @@ static void usage(void)
 
        seed = time(NULL);
 
-       while ((opt = getopt(argc, argv, "U:s:ho:aA")) != EOF) {
+       while ((opt = getopt(argc, argv, "U:s:ho:aAW:")) != EOF) {
                switch (opt) {
                case 'U':
                        pstrcpy(username,optarg);
@@ -533,6 +535,9 @@ static void usage(void)
                case 'h':
                        usage();
                        exit(1);
+               case 'W':
+                       pstrcpy(workgroup, optarg);
+                       break;
                default:
                        printf("Unknown option %c (%d)\n", (char)opt, opt);
                        exit(1);
index d8afbddf98e2d4f8b466bb886a02bafc88db39f3..a3eb95bcaedfc4c047e76da8100e6561e9ee1888 100644 (file)
@@ -274,6 +274,7 @@ static void usage(void)
 "Usage:\n\
   masktest //server/share [options..]\n\
   options:\n\
+        -W workgroup\n\
         -U user%%pass\n\
         -s seed\n\
         -f filechars (default %s)\n\
@@ -322,6 +323,7 @@ static void usage(void)
 
        TimeInit();
        charset_initialise();
+       codepage_initialise(lp_client_code_page());
 
        lp_load(servicesf,True,False,False);
        load_interfaces();
@@ -332,7 +334,7 @@ static void usage(void)
 
        seed = time(NULL);
 
-       while ((opt = getopt(argc, argv, "U:s:hm:f:ao")) != EOF) {
+       while ((opt = getopt(argc, argv, "U:s:hm:f:aoW:")) != EOF) {
                switch (opt) {
                case 'U':
                        pstrcpy(username,optarg);
@@ -361,6 +363,9 @@ static void usage(void)
                case 'o':
                        old_list = True;
                        break;
+               case 'W':
+                       pstrcpy(workgroup, optarg);
+                       break;
                default:
                        printf("Unknown option %c (%d)\n", (char)opt, opt);
                        exit(1);