diff options
author | David Disseldorp <ddiss@samba.org> | 2014-11-25 22:22:24 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-11-26 21:27:21 +0100 |
commit | f83305289919d74704cc7e6dc508e84b3326481a (patch) | |
tree | f182b766fcb31a12054fb44e3c5325ce68054dd9 | |
parent | 2d755a4e2aa1e5dffdd3e8eafa82ce07f428def1 (diff) | |
download | samba-f83305289919d74704cc7e6dc508e84b3326481a.tar.gz |
param: remove unused get_share_params()
Given a share name, get_share_params() returns corresponding snum inside
a struct share_params. find_service() provides duplicate functionality.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Nov 26 21:27:21 CET 2014 on sn-devel-104
-rw-r--r-- | source3/include/proto.h | 2 | ||||
-rw-r--r-- | source3/param/service.c | 22 |
2 files changed, 0 insertions, 24 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index ce23289bab4..82e1032490e 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1084,8 +1084,6 @@ int lp_numservices(void); void lp_dump(FILE *f, bool show_defaults, int maxtoprint); void lp_dump_one(FILE * f, bool show_defaults, int snum); int lp_servicenumber(const char *pszServiceName); -struct share_params *get_share_params(TALLOC_CTX *mem_ctx, - const char *sharename); const char *volume_label(TALLOC_CTX *ctx, int snum); bool lp_domain_master(void); bool lp_preferred_master(void); diff --git a/source3/param/service.c b/source3/param/service.c index 473fc820872..b21be6093d4 100644 --- a/source3/param/service.c +++ b/source3/param/service.c @@ -251,25 +251,3 @@ int find_service(TALLOC_CTX *ctx, const char *service_in, char **p_service_out) return (iService); } - - -struct share_params *get_share_params(TALLOC_CTX *mem_ctx, - const char *sharename) -{ - struct share_params *result; - char *sname = NULL; - int snum; - - snum = find_service(mem_ctx, sharename, &sname); - if (snum < 0 || sname == NULL) { - return NULL; - } - - if (!(result = talloc(mem_ctx, struct share_params))) { - DEBUG(0, ("talloc failed\n")); - return NULL; - } - - result->service = snum; - return result; -} |