1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

lib/param: Remove lpcfg_volume_label() and only caller in NTVFS file server

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
Andrew Bartlett 2021-03-10 15:59:10 +13:00 committed by Volker Lendecke
parent 202d4d6da6
commit 5cdc065211
4 changed files with 0 additions and 21 deletions

View File

@ -3280,18 +3280,6 @@ const char *lpcfg_servicename(const struct loadparm_service *service)
return service ? lpcfg_string((const char *)service->szService) : NULL; return service ? lpcfg_string((const char *)service->szService) : NULL;
} }
/**
* A useful volume label function.
*/
const char *lpcfg_volume_label(struct loadparm_service *service, struct loadparm_service *sDefault)
{
const char *ret;
ret = lpcfg_string((const char *)((service != NULL && service->volume != NULL) ?
service->volume : sDefault->volume));
if (!*ret)
return lpcfg_servicename(service);
return ret;
}
struct smb_iconv_handle *lpcfg_iconv_handle(struct loadparm_context *lp_ctx) struct smb_iconv_handle *lpcfg_iconv_handle(struct loadparm_context *lp_ctx)
{ {
if (lp_ctx == NULL) { if (lp_ctx == NULL) {

View File

@ -179,10 +179,6 @@ struct loadparm_service *lpcfg_servicebynum(struct loadparm_context *lp_ctx,
struct loadparm_service *lpcfg_service(struct loadparm_context *lp_ctx, struct loadparm_service *lpcfg_service(struct loadparm_context *lp_ctx,
const char *service_name); const char *service_name);
/**
* A useful volume label function.
*/
const char *lp_cfg_volume_label(struct loadparm_service *service, struct loadparm_service *sDefault);
struct smb_iconv_handle *lpcfg_iconv_handle(struct loadparm_context *lp_ctx); struct smb_iconv_handle *lpcfg_iconv_handle(struct loadparm_context *lp_ctx);
void lpcfg_smbcli_options(struct loadparm_context *lp_ctx, void lpcfg_smbcli_options(struct loadparm_context *lp_ctx,
struct smbcli_options *options); struct smbcli_options *options);

View File

@ -93,7 +93,6 @@ NTSTATUS share_init(void);
#define SHARE_HOSTS_DENY "hosts-deny" #define SHARE_HOSTS_DENY "hosts-deny"
#define SHARE_NTVFS_HANDLER "ntvfs-handler" #define SHARE_NTVFS_HANDLER "ntvfs-handler"
#define SHARE_TYPE "type" #define SHARE_TYPE "type"
#define SHARE_VOLUME "volume"
#define SHARE_CSC_POLICY "csc-policy" #define SHARE_CSC_POLICY "csc-policy"
#define SHARE_AVAILABLE "available" #define SHARE_AVAILABLE "available"
#define SHARE_BROWSEABLE "browseable" #define SHARE_BROWSEABLE "browseable"

View File

@ -84,10 +84,6 @@ static char *sclassic_string_option(TALLOC_CTX *mem_ctx,
return lpcfg_comment(s, lpcfg_default_service(lp_ctx), mem_ctx); return lpcfg_comment(s, lpcfg_default_service(lp_ctx), mem_ctx);
} }
if (strcmp(opt_name, SHARE_VOLUME) == 0) {
return talloc_strdup(mem_ctx, lpcfg_volume_label(s, lpcfg_default_service(lp_ctx)));
}
if (strcmp(opt_name, SHARE_TYPE) == 0) { if (strcmp(opt_name, SHARE_TYPE) == 0) {
if (lpcfg_printable(s, lpcfg_default_service(lp_ctx))) { if (lpcfg_printable(s, lpcfg_default_service(lp_ctx))) {
return talloc_strdup(mem_ctx, "PRINTER"); return talloc_strdup(mem_ctx, "PRINTER");