printing: move archi_table declarations into nt_printing.h
authorBjörn Jacke <bj@sernet.de>
Wed, 7 Oct 2020 15:54:19 +0000 (17:54 +0200)
committerRalph Boehme <slow@samba.org>
Sat, 17 Oct 2020 09:22:31 +0000 (09:22 +0000)
Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/include/nt_printing.h
source3/printing/nt_printing.c
source3/rpc_server/spoolss/srv_spoolss_nt.c
source3/rpcclient/cmd_spoolss.c
source3/utils/net_rpc_printer.c

index f01ffe5b32ff33bf8b2af7bccc7a143fe678a963..e5391687556b50323b6c0519f3c8f0de8cb5df09 100644 (file)
@@ -191,4 +191,21 @@ void nt_printer_add(TALLOC_CTX *mem_ctx,
                    struct messaging_context *msg_ctx,
                    const char *printer);
 
+/* The version int is used by getdrivers.  Note that
+   all architecture strings that support mutliple
+   versions must be grouped together since enumdrivers
+   uses this property to prevent issuing multiple
+   enumdriver calls for the same arch */
+static const struct print_architecture_table_node archi_table[]= {
+       {SPOOLSS_ARCHITECTURE_4_0,      SPL_ARCH_WIN40,         0 },
+       {SPOOLSS_ARCHITECTURE_NT_X86,   SPL_ARCH_W32X86,        2 },
+       {SPOOLSS_ARCHITECTURE_NT_X86,   SPL_ARCH_W32X86,        3 },
+       {SPOOLSS_ARCHITECTURE_W32MIPS,  SPL_ARCH_W32MIPS,       2 },
+       {SPOOLSS_ARCHITECTURE_W32ALPHA, SPL_ARCH_W32ALPHA,      2 },
+       {SPOOLSS_ARCHITECTURE_W32PPC,   SPL_ARCH_W32PPC,        2 },
+       {SPOOLSS_ARCHITECTURE_IA_64,    SPL_ARCH_IA64,          3 },
+       {SPOOLSS_ARCHITECTURE_x64,      SPL_ARCH_X64,           3 },
+       {NULL,                   "",            -1 }
+};
+
 #endif /* NT_PRINTING_H_ */
index 2296b92b8b04be5c3de9d6ec0e1bb01e9fbe3b3d..3654a4c9b7f3dedc97d021aa43f7de3c674a7644 100644 (file)
@@ -63,18 +63,6 @@ const struct generic_mapping job_generic_mapping = {
        JOB_ALL_ACCESS
 };
 
-static const struct print_architecture_table_node archi_table[]= {
-
-       {"Windows 4.0",          SPL_ARCH_WIN40,        0 },
-       {"Windows NT x86",       SPL_ARCH_W32X86,       2 },
-       {"Windows NT R4000",     SPL_ARCH_W32MIPS,      2 },
-       {"Windows NT Alpha_AXP", SPL_ARCH_W32ALPHA,     2 },
-       {"Windows NT PowerPC",   SPL_ARCH_W32PPC,       2 },
-       {"Windows IA64",         SPL_ARCH_IA64,         3 },
-       {"Windows x64",          SPL_ARCH_X64,          3 },
-       {NULL,                   "",            -1 }
-};
-
 static bool print_driver_directories_init(void)
 {
        int service, i;
index 0f2cfd7d69018cf105048794174827ef694bc44a..e42926a97fa17e0cc3bc71341d62ac88ce3f8607 100644 (file)
@@ -2003,18 +2003,6 @@ WERROR _spoolss_DeletePrinter(struct pipes_struct *p,
  * long architecture string
  ******************************************************************/
 
-static const struct print_architecture_table_node archi_table[]= {
-
-       {"Windows 4.0",          SPL_ARCH_WIN40,        0 },
-       {"Windows NT x86",       SPL_ARCH_W32X86,       2 },
-       {"Windows NT R4000",     SPL_ARCH_W32MIPS,      2 },
-       {"Windows NT Alpha_AXP", SPL_ARCH_W32ALPHA,     2 },
-       {"Windows NT PowerPC",   SPL_ARCH_W32PPC,       2 },
-       {"Windows IA64",         SPL_ARCH_IA64,         3 },
-       {"Windows x64",          SPL_ARCH_X64,          3 },
-       {NULL,                   "",            -1 }
-};
-
 static const int drv_cversion[] = {SPOOLSS_DRIVER_VERSION_9X,
                                   SPOOLSS_DRIVER_VERSION_NT35,
                                   SPOOLSS_DRIVER_VERSION_NT4,
index 3b7abc665bd926e954c4e1da12c7f4303023b018..1706cec4ddb72bad9b0f9c30e015008728d699db 100644 (file)
        W_ERROR_HAVE_NO_MEMORY(_printername); \
 }
 
-/* The version int is used by getdrivers.  Note that
-   all architecture strings that support mutliple
-   versions must be grouped together since enumdrivers
-   uses this property to prevent issuing multiple
-   enumdriver calls for the same arch */
-
-
-static const struct print_architecture_table_node archi_table[]= {
-
-       {"Windows 4.0",          "WIN40",       0 },
-       {"Windows NT x86",       "W32X86",      2 },
-       {"Windows NT x86",       "W32X86",      3 },
-       {"Windows NT R4000",     "W32MIPS",     2 },
-       {"Windows NT Alpha_AXP", "W32ALPHA",    2 },
-       {"Windows NT PowerPC",   "W32PPC",      2 },
-       {"Windows IA64",         "IA64",        3 },
-       {"Windows x64",          "x64",         3 },
-       {NULL,                   "",            -1 }
-};
 
 /**
  * @file
index 691ea821b5d0b32d4ffd02027399c3c53c7f1776..9b17395c16f775e915f81945c5d8b98bfcf09611 100644 (file)
 #include "auth/credentials/credentials.h"
 #include "lib/util/string_wrappers.h"
 
-/* support itanium as well */
-static const struct print_architecture_table_node archi_table[]= {
-
-       {"Windows 4.0",          "WIN40",       0 },
-       {"Windows NT x86",       "W32X86",      2 },
-       {"Windows NT x86",       "W32X86",      3 },
-       {"Windows NT R4000",     "W32MIPS",     2 },
-       {"Windows NT Alpha_AXP", "W32ALPHA",    2 },
-       {"Windows NT PowerPC",   "W32PPC",      2 },
-       {"Windows IA64",         "IA64",        3 },
-       {"Windows x64",          "x64",         3 },
-       {NULL,                   "",            -1 }
-};
-
 
 /**
  * This display-printdriver-functions was borrowed from rpcclient/cmd_spoolss.c.