summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@samba.org>2012-01-11 12:29:58 +0100
committerDavid Disseldorp <ddiss@samba.org>2012-01-11 14:39:35 +0100
commit97818fd6e552f6ddc30f5b9728d6e82121150867 (patch)
treedb7e7b354f8b97590ebe20853ee27c632ba2b456 /source3/rpcclient
parent8dc9fbd3af0008aac70194ab69f50352a13b9230 (diff)
downloadsamba-97818fd6e552f6ddc30f5b9728d6e82121150867.tar.gz
samba-97818fd6e552f6ddc30f5b9728d6e82121150867.tar.bz2
samba-97818fd6e552f6ddc30f5b9728d6e82121150867.zip
s3-rpcclient: add deldriverex flags argument
The spoolss DeletePrinterDriverEx command offers three flags for controlling how associated files and other versions of the driver are effected: DPD_DELETE_UNUSED_FILES (1), DPD_DELETE_SPECIFIC_VERSION (2) and DPD_DELETE_ALL_FILES (4). This commit adds an optional numeric flags argument to the rpcclient deldriverex command. Signed-off-by: David Disseldorp <ddiss@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Autobuild-User: David Disseldorp <ddiss@samba.org> Autobuild-Date: Wed Jan 11 14:39:35 CET 2012 on sn-devel-104
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_spoolss.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 0e12201f92..21f70aeb41 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -1928,24 +1928,24 @@ static WERROR cmd_spoolss_deletedriverex(struct rpc_pipe_client *cli,
uint32_t delete_flags = 0;
/* parse the command arguments */
- if (argc < 2 || argc > 4) {
- printf ("Usage: %s <driver> [arch] [version]\n", argv[0]);
+ if (argc < 2 || argc > 5) {
+ printf("Usage: %s <driver> [arch] [version] [flags]\n", argv[0]);
return WERR_OK;
}
if (argc >= 3)
arch = argv[2];
- if (argc == 4)
- vers = atoi (argv[3]);
-
- if (vers >= 0) {
+ if (argc >= 4) {
+ vers = atoi(argv[3]);
delete_flags |= DPD_DELETE_SPECIFIC_VERSION;
}
+ if (argc == 5)
+ delete_flags = atoi(argv[4]);
/* delete the driver for all architectures */
for (i=0; archi_table[i].long_archi; i++) {
- if (arch && !strequal( archi_table[i].long_archi, arch))
+ if (arch && !strequal(archi_table[i].long_archi, arch))
continue;
if (vers >= 0 && archi_table[i].version != vers)