net: Move printer help to net_rpc where it's used.
authorKai Blin <kai@samba.org>
Wed, 14 May 2008 12:29:52 +0000 (14:29 +0200)
committerKai Blin <kai@samba.org>
Tue, 20 May 2008 12:28:03 +0000 (14:28 +0200)
(This used to be commit 2ee3d1aefab8dada5bd05a92b72776554617b7f9)

source3/utils/net_help.c
source3/utils/net_proto.h
source3/utils/net_rpc.c

index 9648f2f8f7634ca6694f32c6c16c75316bdc26fe..51dc1a0c5178ab3a0d7c6d581ec6087de77a7e68 100644 (file)
@@ -33,38 +33,6 @@ static int help_usage(struct net_context *c, int argc, const char **argv)
        return -1;
 }
 
-int net_help_printer(struct net_context *c, int argc, const char **argv)
-{
-       d_printf("net rpc printer LIST [printer] [misc. options] [targets]\n"\
-                "\tlists all printers on print-server\n\n");
-       d_printf("net rpc printer DRIVER [printer] [misc. options] [targets]\n"\
-                "\tlists all printer-drivers on print-server\n\n");
-       d_printf("net rpc printer PUBLISH action [printer] [misc. options] [targets]\n"\
-                "\tpublishes printer settings in Active Directory\n"
-                "\taction can be one of PUBLISH, UPDATE, UNPUBLISH or LIST\n\n");
-       d_printf("net rpc printer MIGRATE PRINTERS [printer] [misc. options] [targets]"\
-                "\n\tmigrates printers from remote to local server\n\n");
-       d_printf("net rpc printer MIGRATE SETTINGS [printer] [misc. options] [targets]"\
-                "\n\tmigrates printer-settings from remote to local server\n\n");
-       d_printf("net rpc printer MIGRATE DRIVERS [printer] [misc. options] [targets]"\
-                "\n\tmigrates printer-drivers from remote to local server\n\n");
-       d_printf("net rpc printer MIGRATE FORMS [printer] [misc. options] [targets]"\
-                "\n\tmigrates printer-forms from remote to local server\n\n");
-       d_printf("net rpc printer MIGRATE SECURITY [printer] [misc. options] [targets]"\
-                "\n\tmigrates printer-ACLs from remote to local server\n\n");
-       d_printf("net rpc printer MIGRATE ALL [printer] [misc. options] [targets]"\
-                "\n\tmigrates drivers, forms, queues, settings and acls from\n"\
-                "\tremote to local print-server\n\n");
-       net_common_methods_usage(c, argc, argv);
-       net_common_flags_usage(c, argc, argv);
-       d_printf(
-        "\t-v or --verbose\t\t\tgive verbose output\n"
-        "\t      --destination\t\tmigration target server (default: localhost)\n");
-
-       return -1;
-}
-
-
 int net_help_status(struct net_context *c, int argc, const char **argv)
 {
        d_printf("  net status sessions [parseable] "
index 1472e8feb8ae05d5212bd304a88e9c411cd541d7..d429aa7ee260b618cfbbe540ff04937607710a5a 100644 (file)
@@ -117,7 +117,6 @@ int net_groupmap(struct net_context *c, int argc, const char **argv);
 
 /* The following definitions come from utils/net_help.c  */
 
-int net_help_printer(struct net_context *c, int argc, const char **argv);
 int net_help_status(struct net_context *c, int argc, const char **argv);
 int net_help(struct net_context *c, int argc, const char **argv);
 
index fc22ca9dafad4ada0ec0e04cfcd1f003bf119a00..a7ff9bf0a8b731049d7c2f6c8d2336f94dafd69b 100644 (file)
@@ -6925,7 +6925,33 @@ static int rpc_printer_publish(struct net_context *c, int argc,
  **/
 int rpc_printer_usage(struct net_context *c, int argc, const char **argv)
 {
-        return net_help_printer(c, argc, argv);
+       d_printf("net rpc printer LIST [printer] [misc. options] [targets]\n"\
+                "\tlists all printers on print-server\n\n");
+       d_printf("net rpc printer DRIVER [printer] [misc. options] [targets]\n"\
+                "\tlists all printer-drivers on print-server\n\n");
+       d_printf("net rpc printer PUBLISH action [printer] [misc. options] [targets]\n"\
+                "\tpublishes printer settings in Active Directory\n"
+                "\taction can be one of PUBLISH, UPDATE, UNPUBLISH or LIST\n\n");
+       d_printf("net rpc printer MIGRATE PRINTERS [printer] [misc. options] [targets]"\
+                "\n\tmigrates printers from remote to local server\n\n");
+       d_printf("net rpc printer MIGRATE SETTINGS [printer] [misc. options] [targets]"\
+                "\n\tmigrates printer-settings from remote to local server\n\n");
+       d_printf("net rpc printer MIGRATE DRIVERS [printer] [misc. options] [targets]"\
+                "\n\tmigrates printer-drivers from remote to local server\n\n");
+       d_printf("net rpc printer MIGRATE FORMS [printer] [misc. options] [targets]"\
+                "\n\tmigrates printer-forms from remote to local server\n\n");
+       d_printf("net rpc printer MIGRATE SECURITY [printer] [misc. options] [targets]"\
+                "\n\tmigrates printer-ACLs from remote to local server\n\n");
+       d_printf("net rpc printer MIGRATE ALL [printer] [misc. options] [targets]"\
+                "\n\tmigrates drivers, forms, queues, settings and acls from\n"\
+                "\tremote to local print-server\n\n");
+       net_common_methods_usage(c, argc, argv);
+       net_common_flags_usage(c, argc, argv);
+       d_printf(
+        "\t-v or --verbose\t\t\tgive verbose output\n"
+        "\t      --destination\t\tmigration target server (default: localhost)\n");
+
+       return -1;
 }
 
 /**