From: Günther Deschner Date: Thu, 8 Sep 2016 19:23:54 +0000 (+0200) Subject: s3-printing: add spoolss_get_short_filesys_environment function. X-Git-Tag: tdb-1.3.15~256 X-Git-Url: http://git.samba.org/samba.git/?p=vlendec%2Fsamba-autobuild%2F.git;a=commitdiff_plain;h=2621a2dae945591773e04aa78e97397ec4acaf95 s3-printing: add spoolss_get_short_filesys_environment function. Note this is different from "get_short_archi" and reflects what windows uses internally. Guenther Signed-off-by: Guenther Deschner Reviewed-by: Andreas Schneider --- diff --git a/source3/rpc_client/init_spoolss.c b/source3/rpc_client/init_spoolss.c index e5f70c0b045..9a4dab6d417 100644 --- a/source3/rpc_client/init_spoolss.c +++ b/source3/rpc_client/init_spoolss.c @@ -435,3 +435,14 @@ WERROR spoolss_create_default_secdesc(TALLOC_CTX *mem_ctx, return WERR_OK; } + +const char *spoolss_get_short_filesys_environment(const char *environment) +{ + if (strequal(environment, SPOOLSS_ARCHITECTURE_x64)) { + return "amd64"; + } else if (strequal(environment, SPOOLSS_ARCHITECTURE_NT_X86)) { + return "x86"; + } else { + return NULL; + } +} diff --git a/source3/rpc_client/init_spoolss.h b/source3/rpc_client/init_spoolss.h index 28dbb1b7b8b..376eaefe914 100644 --- a/source3/rpc_client/init_spoolss.h +++ b/source3/rpc_client/init_spoolss.h @@ -47,5 +47,6 @@ WERROR spoolss_create_default_devmode(TALLOC_CTX *mem_ctx, WERROR spoolss_create_default_secdesc(TALLOC_CTX *mem_ctx, struct spoolss_security_descriptor **secdesc); +const char *spoolss_get_short_filesys_environment(const char *environment); #endif /* _RPC_CLIENT_INIT_SPOOLSS_H_ */