From be673d9d093d977f4f38f2dba3f422c796db37b7 Mon Sep 17 00:00:00 2001 From: Yaniv Kaul Date: Wed, 22 Jan 2020 15:50:27 +0200 Subject: multiple files: ensure nfs_svc functions are available When gNFS is disabled in build time, we have to ensure taht the .stop(), .start() and other functions of the nfs_svc are not called, otherwise we'd crash. In addition, #ifdef more code that is gNFS related. updates: bz#1793995 Signed-off-by: Yaniv Kaul Change-Id: I5081f1670c04ca306aeaab7208829b0f2f149a42 --- xlators/mgmt/glusterd/src/glusterd-handler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-handler.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index 1c03f7580cd..175e73f5ae4 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -5782,13 +5782,13 @@ glusterd_get_state(rpcsvc_request_t *req, dict_t *dict) count = 0; fprintf(fp, "\n[Services]\n"); - +#ifdef BUILD_GNFS if (priv->nfs_svc.inited) { fprintf(fp, "svc%d.name: %s\n", ++count, priv->nfs_svc.name); fprintf(fp, "svc%d.online_status: %s\n\n", count, priv->nfs_svc.online ? "Online" : "Offline"); } - +#endif if (priv->bitd_svc.inited) { fprintf(fp, "svc%d.name: %s\n", ++count, priv->bitd_svc.name); fprintf(fp, "svc%d.online_status: %s\n\n", count, -- cgit