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:
parent
202d4d6da6
commit
5cdc065211
@ -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) {
|
||||||
|
@ -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);
|
||||||
|
@ -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"
|
||||||
|
@ -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");
|
||||||
|
Loading…
Reference in New Issue
Block a user