summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-01-16 20:16:25 +0100
committerVolker Lendecke <vl@samba.org>2011-01-17 08:03:43 +0100
commitc7a5933e4b907d0dc50c01b299a5822392c86049 (patch)
treec18a9240fd863894eb2c990deb0c002c55d6ae6e /source3
parent6f3e11088c2783ccc5c7e785d3a67afb82e20db0 (diff)
downloadsamba-c7a5933e4b907d0dc50c01b299a5822392c86049.tar.gz
samba-c7a5933e4b907d0dc50c01b299a5822392c86049.tar.bz2
samba-c7a5933e4b907d0dc50c01b299a5822392c86049.zip
s3: Remove some unused code
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h2
-rw-r--r--source3/libsmb/cliprint.c105
2 files changed, 0 insertions, 107 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 6a11ce4bb0..f3ec4d16c6 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2251,8 +2251,6 @@ void cli_oplock_handler(struct cli_state *cli,
int cli_print_queue(struct cli_state *cli,
void (*fn)(struct print_job_info *));
int cli_printjob_del(struct cli_state *cli, int job);
-int cli_spl_open(struct cli_state *cli, const char *fname, int flags, int share_mode);
-bool cli_spl_close(struct cli_state *cli, uint16_t fnum);
/* The following definitions come from libsmb/cliquota.c */
diff --git a/source3/libsmb/cliprint.c b/source3/libsmb/cliprint.c
index 89e80d2904..9125c5d6a4 100644
--- a/source3/libsmb/cliprint.c
+++ b/source3/libsmb/cliprint.c
@@ -155,108 +155,3 @@ int cli_printjob_del(struct cli_state *cli, int job)
return ret;
}
-
-
-/****************************************************************************
- Open a spool file
-****************************************************************************/
-
-int cli_spl_open(struct cli_state *cli, const char *fname, int flags, int share_mode)
-{
- char *p;
- unsigned openfn=0;
- unsigned accessmode=0;
-
- if (flags & O_CREAT)
- openfn |= (1<<4);
- if (!(flags & O_EXCL)) {
- if (flags & O_TRUNC)
- openfn |= (1<<1);
- else
- openfn |= (1<<0);
- }
-
- accessmode = (share_mode<<4);
-
- if ((flags & O_ACCMODE) == O_RDWR) {
- accessmode |= 2;
- } else if ((flags & O_ACCMODE) == O_WRONLY) {
- accessmode |= 1;
- }
-
-#if defined(O_SYNC)
- if ((flags & O_SYNC) == O_SYNC) {
- accessmode |= (1<<14);
- }
-#endif /* O_SYNC */
-
- if (share_mode == DENY_FCB) {
- accessmode = 0xFF;
- }
-
- memset(cli->outbuf,'\0',smb_size);
- memset(cli->inbuf,'\0',smb_size);
-
- cli_set_message(cli->outbuf,15,0,True);
-
- SCVAL(cli->outbuf,smb_com,SMBsplopen);
- SSVAL(cli->outbuf,smb_tid,cli->cnum);
- cli_setup_packet(cli);
-
- SSVAL(cli->outbuf,smb_vwv0,0xFF);
- SSVAL(cli->outbuf,smb_vwv2,0); /* no additional info */
- SSVAL(cli->outbuf,smb_vwv3,accessmode);
- SSVAL(cli->outbuf,smb_vwv4,aSYSTEM | aHIDDEN);
- SSVAL(cli->outbuf,smb_vwv5,0);
- SSVAL(cli->outbuf,smb_vwv8,openfn);
-
- if (cli->use_oplocks) {
- /* if using oplocks then ask for a batch oplock via
- core and extended methods */
- SCVAL(cli->outbuf,smb_flg, CVAL(cli->outbuf,smb_flg)|
- FLAG_REQUEST_OPLOCK|FLAG_REQUEST_BATCH_OPLOCK);
- SSVAL(cli->outbuf,smb_vwv2,SVAL(cli->outbuf,smb_vwv2) | 6);
- }
-
- p = smb_buf(cli->outbuf);
- p += clistr_push(cli, p, fname, -1, STR_TERMINATE);
-
- cli_setup_bcc(cli, p);
-
- cli_send_smb(cli);
- if (!cli_receive_smb(cli)) {
- return -1;
- }
-
- if (cli_is_error(cli)) {
- return -1;
- }
-
- return SVAL(cli->inbuf,smb_vwv2);
-}
-
-/****************************************************************************
- Close a file.
-****************************************************************************/
-
-bool cli_spl_close(struct cli_state *cli, uint16_t fnum)
-{
- memset(cli->outbuf,'\0',smb_size);
- memset(cli->inbuf,'\0',smb_size);
-
- cli_set_message(cli->outbuf,3,0,True);
-
- SCVAL(cli->outbuf,smb_com,SMBsplclose);
- SSVAL(cli->outbuf,smb_tid,cli->cnum);
- cli_setup_packet(cli);
-
- SSVAL(cli->outbuf,smb_vwv0,fnum);
- SIVALS(cli->outbuf,smb_vwv1,-1);
-
- cli_send_smb(cli);
- if (!cli_receive_smb(cli)) {
- return False;
- }
-
- return !cli_is_error(cli);
-}