From 40e9d0c440fb436f48e854d8b44b31fef47aaee7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Baumbach?= Date: Fri, 22 Jul 2011 14:23:56 +0200 Subject: [PATCH] s3-libsmb: finally remove cli_read_old() Replaced by new cli_read() which returns NTSTATUS instead of ssize_t. Signed-off-by: Stefan Metzmacher --- source3/libsmb/clireadwrite.c | 14 -------------- source3/libsmb/proto.h | 2 -- 2 files changed, 16 deletions(-) diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c index 54060077847..413668d1081 100644 --- a/source3/libsmb/clireadwrite.c +++ b/source3/libsmb/clireadwrite.c @@ -691,20 +691,6 @@ static NTSTATUS cli_read_sink(char *buf, size_t n, void *priv) return NT_STATUS_OK; } -ssize_t cli_read_old(struct cli_state *cli, uint16_t fnum, char *buf, - off_t offset, size_t size) -{ - NTSTATUS status; - SMB_OFF_T ret; - - status = cli_pull(cli, fnum, offset, size, size, - cli_read_sink, &buf, &ret); - if (!NT_STATUS_IS_OK(status)) { - return -1; - } - return ret; -} - NTSTATUS cli_read(struct cli_state *cli, uint16_t fnum, char *buf, off_t offset, size_t size, size_t *nread) diff --git a/source3/libsmb/proto.h b/source3/libsmb/proto.h index 7924091935a..6f2ba3ce4c7 100644 --- a/source3/libsmb/proto.h +++ b/source3/libsmb/proto.h @@ -746,8 +746,6 @@ NTSTATUS cli_pull(struct cli_state *cli, uint16_t fnum, off_t start_offset, SMB_OFF_T size, size_t window_size, NTSTATUS (*sink)(char *buf, size_t n, void *priv), void *priv, SMB_OFF_T *received); -ssize_t cli_read_old(struct cli_state *cli, uint16_t fnum, char *buf, - off_t offset, size_t size); NTSTATUS cli_read(struct cli_state *cli, uint16_t fnum, char *buf, off_t offset, size_t size, size_t *nread); -- 2.11.4.GIT