Skip to contentSkip to conversation

Remove nsdb_display_fedfsconnectionsec()

PATCH In review Chuck Lever 2 participants 5 messages Feb 8, 2018 – Feb 13, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Remove nsdb_display_fedfsconnectionsec()

This is a display helper function that is not needed in nfs-utils because nfs-utils does not implement the FedFS ADMIN protocol (and therefore does not need to display ADMIN protocol-related security settings).

---
 support/include/junction.h |    1 -
 support/junction/display.c |   20 --------------------
 2 files changed, 21 deletions(-)
support/include/junction.h +0 -1
index a5f3844..67cf017 100644
@@ -118,7 +118,6 @@ FedFsStatus	 nsdb_posix_to_path_array(const char *pathname,
  ** Readability helpers
  **/
 
-const char      *nsdb_display_fedfsconnectionsec(const FedFsConnectionSec sectype);
 const char      *nsdb_display_fedfsstatus(const FedFsStatus status);
 void             nsdb_print_fedfsstatus(const FedFsStatus status);
 
support/junction/display.c +0 -20
index 77b131f..e1e1af1 100644
@@ -32,26 +32,6 @@
 #include "junction.h"
 
 /**
- * Return human-readable equivalent of a FedFsConnectionSec value
- *
- * @param sectype FedFsConneccionSec value
- * @return a static NUL-terminated C string
- */
-const char *
-nsdb_display_fedfsconnectionsec(const FedFsConnectionSec sectype)
-{
-	switch (sectype) {
-	case FEDFS_SEC_NONE:
-		return "FEDFS_SEC_NONE";
-	case FEDFS_SEC_TLS:
-		return "FEDFS_SEC_TLS";
-	default:
-		break;
-	}
-	return "unrecognized security type";
-}
-
-/**
  * Return human-readable equivalent of a FedFsStatus value
  *
  * @param status FedFsStatus code
#1 lore raw

PATCH 2/2 Remove fedfs_admin.h

nfs-utils is not going to provide an implementation of the FedFS ADMIN protocol, so there's no need to include the entire .x file for that protocol.

The only piece needed (for the moment) is the enum that defines the FEDFS_ERR codes, which are used by the internal and external libjunction APIs.

---
 support/include/Makefile.am   |    1 
 support/include/fedfs_admin.h |  342 -----------------------------------------
 support/include/junction.h    |   47 +++++-
 support/junction/path.c       |    1 
 utils/nfsref/add.c            |    1 
 utils/nfsref/nfsref.c         |    1 
 6 files changed, 48 insertions(+), 345 deletions(-)
 delete mode 100644 support/include/fedfs_admin.h
support/include/Makefile.am +0 -1
index 11cb162..599f500 100644
@@ -5,7 +5,6 @@ SUBDIRS = nfs rpcsvc sys
 noinst_HEADERS = \
 	cld.h \
 	exportfs.h \
-	fedfs_admin.h \
 	ha-callout.h \
 	junction.h \
 	misc.h \
support/include/fedfs_admin.h deleted +0 -342

342 lines not on this page · raw message

support/include/junction.h +45 -2

53 lines not on this page · raw message

support/junction/path.c +1 -0
index d33808f..68a1d13 100644
@@ -33,6 +33,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
+#include <dirent.h>
 
 #include <netinet/in.h>
 
utils/nfsref/add.c +1 -0
index d5d0cf8..781aeee 100644
@@ -29,6 +29,7 @@
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdlib.h>
+#include <string.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <errno.h>
utils/nfsref/nfsref.c +1 -0
index ff7013e..7f97d01 100644
@@ -33,6 +33,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
+#include <string.h>
 #include <fcntl.h>
 #include <getopt.h>
 #include <time.h>
#2 lore raw

Re: [PATCH 2/2] Remove fedfs_admin.h

Quoted 10 lines · Chuck Lever

nfs-utils is not going to provide an implementation of the FedFS ADMIN protocol, so there's no need to include the entire .x file for that protocol.

The only piece needed (for the moment) is the enum that defines the FEDFS_ERR codes, which are used by the internal and external libjunction APIs.

Committed...

steved.

Quoted 465 lines
---
 support/include/Makefile.am   |    1 
 support/include/fedfs_admin.h |  342 -----------------------------------------
 support/include/junction.h    |   47 +++++-
 support/junction/path.c       |    1 
 utils/nfsref/add.c            |    1 
 utils/nfsref/nfsref.c         |    1 
 6 files changed, 48 insertions(+), 345 deletions(-)
 delete mode 100644 support/include/fedfs_admin.h
support/include/Makefile.am +0 -1
index 11cb162..599f500 100644
@@ -5,7 +5,6 @@ SUBDIRS = nfs rpcsvc sys
 noinst_HEADERS = \
 	cld.h \
 	exportfs.h \
-	fedfs_admin.h \
 	ha-callout.h \
 	junction.h \
 	misc.h \
support/include/fedfs_admin.h deleted +0 -342
deleted file mode 100644
index d8b6715..0000000
@@ -1,342 +0,0 @@
-/*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
-
-#ifndef _FEDFS_ADMIN_H_RPCGEN
-#define _FEDFS_ADMIN_H_RPCGEN
-
-#include <rpc/rpc.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-enum FedFsStatus {
-	FEDFS_OK = 0,
-	FEDFS_ERR_ACCESS = 1,
-	FEDFS_ERR_BADCHAR = 2,
-	FEDFS_ERR_BADNAME = 3,
-	FEDFS_ERR_NAMETOOLONG = 4,
-	FEDFS_ERR_LOOP = 5,
-	FEDFS_ERR_BADXDR = 6,
-	FEDFS_ERR_EXIST = 7,
-	FEDFS_ERR_INVAL = 8,
-	FEDFS_ERR_IO = 9,
-	FEDFS_ERR_NOSPC = 10,
-	FEDFS_ERR_NOTJUNCT = 11,
-	FEDFS_ERR_NOTLOCAL = 12,
-	FEDFS_ERR_PERM = 13,
-	FEDFS_ERR_ROFS = 14,
-	FEDFS_ERR_SVRFAULT = 15,
-	FEDFS_ERR_NOTSUPP = 16,
-	FEDFS_ERR_NSDB_ROUTE = 17,
-	FEDFS_ERR_NSDB_DOWN = 18,
-	FEDFS_ERR_NSDB_CONN = 19,
-	FEDFS_ERR_NSDB_AUTH = 20,
-	FEDFS_ERR_NSDB_LDAP = 21,
-	FEDFS_ERR_NSDB_LDAP_VAL = 22,
-	FEDFS_ERR_NSDB_NONCE = 23,
-	FEDFS_ERR_NSDB_NOFSN = 24,
-	FEDFS_ERR_NSDB_NOFSL = 25,
-	FEDFS_ERR_NSDB_RESPONSE = 26,
-	FEDFS_ERR_NSDB_FAULT = 27,
-	FEDFS_ERR_NSDB_PARAMS = 28,
-	FEDFS_ERR_NSDB_LDAP_REFERRAL = 29,
-	FEDFS_ERR_NSDB_LDAP_REFERRAL_VAL = 30,
-	FEDFS_ERR_NSDB_LDAP_REFERRAL_NOTFOLLOWED = 31,
-	FEDFS_ERR_NSDB_PARAMS_LDAP_REFERRAL = 32,
-	FEDFS_ERR_PATH_TYPE_UNSUPP = 33,
-	FEDFS_ERR_DELAY = 34,
-	FEDFS_ERR_NO_CACHE = 35,
-	FEDFS_ERR_UNKNOWN_CACHE = 36,
-	FEDFS_ERR_NO_CACHE_UPDATE = 37,
-};
-typedef enum FedFsStatus FedFsStatus;
-
-typedef struct {
-	u_int utf8string_len;
-	char *utf8string_val;
-} utf8string;
-
-typedef utf8string ascii_REQUIRED4;
-
-typedef utf8string utf8val_REQUIRED4;
-
-typedef char FedFsUuid[16];
-
-struct FedFsNsdbName {
-	u_int port;
-	utf8val_REQUIRED4 hostname;
-};
-typedef struct FedFsNsdbName FedFsNsdbName;
-
-typedef ascii_REQUIRED4 FedFsPathComponent;
-
-typedef struct {
-	u_int FedFsPathName_len;
-	FedFsPathComponent *FedFsPathName_val;
-} FedFsPathName;
-
-struct FedFsFsn {
-	FedFsUuid fsnUuid;
-	FedFsNsdbName nsdbName;
-};
-typedef struct FedFsFsn FedFsFsn;
-
-enum FedFsFslType {
-	FEDFS_NFS_FSL = 0,
-};
-typedef enum FedFsFslType FedFsFslType;
-
-struct FedFsNfsFsl {
-	FedFsUuid fslUuid;
-	u_int port;
-	utf8val_REQUIRED4 hostname;
-	FedFsPathName path;
-};
-typedef struct FedFsNfsFsl FedFsNfsFsl;
-
-struct FedFsFsl {
-	FedFsFslType type;
-	union {
-		FedFsNfsFsl nfsFsl;
-	} FedFsFsl_u;
-};
-typedef struct FedFsFsl FedFsFsl;
-
-enum FedFsPathType {
-	FEDFS_PATH_SYS = 0,
-	FEDFS_PATH_NFS = 1,
-};
-typedef enum FedFsPathType FedFsPathType;
-
-struct FedFsPath {
-	FedFsPathType type;
-	union {
-		FedFsPathName adminPath;
-		FedFsPathName nfsPath;
-	} FedFsPath_u;
-};
-typedef struct FedFsPath FedFsPath;
-
-struct FedFsCreateArgs {
-	FedFsPath path;
-	FedFsFsn fsn;
-};
-typedef struct FedFsCreateArgs FedFsCreateArgs;
-
-enum FedFsResolveType {
-	FEDFS_RESOLVE_NONE = 0,
-	FEDFS_RESOLVE_CACHE = 1,
-	FEDFS_RESOLVE_NSDB = 2,
-};
-typedef enum FedFsResolveType FedFsResolveType;
-
-struct FedFsLookupArgs {
-	FedFsPath path;
-	FedFsResolveType resolve;
-};
-typedef struct FedFsLookupArgs FedFsLookupArgs;
-
-struct FedFsLookupResOk {
-	FedFsFsn fsn;
-	struct {
-		u_int fsl_len;
-		FedFsFsl *fsl_val;
-	} fsl;
-};
-typedef struct FedFsLookupResOk FedFsLookupResOk;
-
-struct FedFsLookupResReferralVal {
-	FedFsNsdbName targetNsdb;
-	u_int ldapResultCode;
-};
-typedef struct FedFsLookupResReferralVal FedFsLookupResReferralVal;
-
-struct FedFsLookupRes {
-	FedFsStatus status;
-	union {
-		FedFsLookupResOk resok;
-		u_int ldapResultCode;
-		FedFsNsdbName targetNsdb;
-		FedFsLookupResReferralVal resReferralVal;
-	} FedFsLookupRes_u;
-};
-typedef struct FedFsLookupRes FedFsLookupRes;
-
-enum FedFsConnectionSec {
-	FEDFS_SEC_NONE = 0,
-	FEDFS_SEC_TLS = 1,
-};
-typedef enum FedFsConnectionSec FedFsConnectionSec;
-
-struct FedFsNsdbParams {
-	FedFsConnectionSec secType;
-	union {
-		struct {
-			u_int secData_len;
-			char *secData_val;
-		} secData;
-	} FedFsNsdbParams_u;
-};
-typedef struct FedFsNsdbParams FedFsNsdbParams;
-
-struct FedFsSetNsdbParamsArgs {
-	FedFsNsdbName nsdbName;
-	FedFsNsdbParams params;
-};
-typedef struct FedFsSetNsdbParamsArgs FedFsSetNsdbParamsArgs;
-
-struct FedFsGetNsdbParamsRes {
-	FedFsStatus status;
-	union {
-		FedFsNsdbParams params;
-	} FedFsGetNsdbParamsRes_u;
-};
-typedef struct FedFsGetNsdbParamsRes FedFsGetNsdbParamsRes;
-
-struct FedFsGetLimitedNsdbParamsRes {
-	FedFsStatus status;
-	union {
-		FedFsConnectionSec secType;
-	} FedFsGetLimitedNsdbParamsRes_u;
-};
-typedef struct FedFsGetLimitedNsdbParamsRes FedFsGetLimitedNsdbParamsRes;
-#define FEDFS_ADMIN_X
-
-#define FEDFS_PROG 100418
-#define FEDFS_V1 1
-
-#if defined(__STDC__) || defined(__cplusplus)
-#define FEDFS_NULL 0
-extern  void * fedfs_null_1(void *, CLIENT *);
-extern  void * fedfs_null_1_svc(void *, struct svc_req *);
-#define FEDFS_CREATE_JUNCTION 1
-extern  FedFsStatus * fedfs_create_junction_1(FedFsCreateArgs *, CLIENT *);
-extern  FedFsStatus * fedfs_create_junction_1_svc(FedFsCreateArgs *, struct svc_req *);
-#define FEDFS_DELETE_JUNCTION 2
-extern  FedFsStatus * fedfs_delete_junction_1(FedFsPath *, CLIENT *);
-extern  FedFsStatus * fedfs_delete_junction_1_svc(FedFsPath *, struct svc_req *);
-#define FEDFS_LOOKUP_JUNCTION 3
-extern  FedFsLookupRes * fedfs_lookup_junction_1(FedFsLookupArgs *, CLIENT *);
-extern  FedFsLookupRes * fedfs_lookup_junction_1_svc(FedFsLookupArgs *, struct svc_req *);
-#define FEDFS_CREATE_REPLICATION 7
-extern  FedFsStatus * fedfs_create_replication_1(FedFsCreateArgs *, CLIENT *);
-extern  FedFsStatus * fedfs_create_replication_1_svc(FedFsCreateArgs *, struct svc_req *);
-#define FEDFS_DELETE_REPLICATION 8
-extern  FedFsStatus * fedfs_delete_replication_1(FedFsPath *, CLIENT *);
-extern  FedFsStatus * fedfs_delete_replication_1_svc(FedFsPath *, struct svc_req *);
-#define FEDFS_LOOKUP_REPLICATION 9
-extern  FedFsLookupRes * fedfs_lookup_replication_1(FedFsLookupArgs *, CLIENT *);
-extern  FedFsLookupRes * fedfs_lookup_replication_1_svc(FedFsLookupArgs *, struct svc_req *);
-#define FEDFS_SET_NSDB_PARAMS 4
-extern  FedFsStatus * fedfs_set_nsdb_params_1(FedFsSetNsdbParamsArgs *, CLIENT *);
-extern  FedFsStatus * fedfs_set_nsdb_params_1_svc(FedFsSetNsdbParamsArgs *, struct svc_req *);
-#define FEDFS_GET_NSDB_PARAMS 5
-extern  FedFsGetNsdbParamsRes * fedfs_get_nsdb_params_1(FedFsNsdbName *, CLIENT *);
-extern  FedFsGetNsdbParamsRes * fedfs_get_nsdb_params_1_svc(FedFsNsdbName *, struct svc_req *);
-#define FEDFS_GET_LIMITED_NSDB_PARAMS 6
-extern  FedFsGetLimitedNsdbParamsRes * fedfs_get_limited_nsdb_params_1(FedFsNsdbName *, CLIENT *);
-extern  FedFsGetLimitedNsdbParamsRes * fedfs_get_limited_nsdb_params_1_svc(FedFsNsdbName *, struct svc_req *);
-extern int fedfs_prog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
-
-#else /* K&R C */
-#define FEDFS_NULL 0
-extern  void * fedfs_null_1();
-extern  void * fedfs_null_1_svc();
-#define FEDFS_CREATE_JUNCTION 1
-extern  FedFsStatus * fedfs_create_junction_1();
-extern  FedFsStatus * fedfs_create_junction_1_svc();
-#define FEDFS_DELETE_JUNCTION 2
-extern  FedFsStatus * fedfs_delete_junction_1();
-extern  FedFsStatus * fedfs_delete_junction_1_svc();
-#define FEDFS_LOOKUP_JUNCTION 3
-extern  FedFsLookupRes * fedfs_lookup_junction_1();
-extern  FedFsLookupRes * fedfs_lookup_junction_1_svc();
-#define FEDFS_CREATE_REPLICATION 7
-extern  FedFsStatus * fedfs_create_replication_1();
-extern  FedFsStatus * fedfs_create_replication_1_svc();
-#define FEDFS_DELETE_REPLICATION 8
-extern  FedFsStatus * fedfs_delete_replication_1();
-extern  FedFsStatus * fedfs_delete_replication_1_svc();
-#define FEDFS_LOOKUP_REPLICATION 9
-extern  FedFsLookupRes * fedfs_lookup_replication_1();
-extern  FedFsLookupRes * fedfs_lookup_replication_1_svc();
-#define FEDFS_SET_NSDB_PARAMS 4
-extern  FedFsStatus * fedfs_set_nsdb_params_1();
-extern  FedFsStatus * fedfs_set_nsdb_params_1_svc();
-#define FEDFS_GET_NSDB_PARAMS 5
-extern  FedFsGetNsdbParamsRes * fedfs_get_nsdb_params_1();
-extern  FedFsGetNsdbParamsRes * fedfs_get_nsdb_params_1_svc();
-#define FEDFS_GET_LIMITED_NSDB_PARAMS 6
-extern  FedFsGetLimitedNsdbParamsRes * fedfs_get_limited_nsdb_params_1();
-extern  FedFsGetLimitedNsdbParamsRes * fedfs_get_limited_nsdb_params_1_svc();
-extern int fedfs_prog_1_freeresult ();
-#endif /* K&R C */
-
-/* the xdr functions */
-
-#if defined(__STDC__) || defined(__cplusplus)
-extern  bool_t xdr_FedFsStatus (XDR *, FedFsStatus*);
-extern  bool_t xdr_utf8string (XDR *, utf8string*);
-extern  bool_t xdr_ascii_REQUIRED4 (XDR *, ascii_REQUIRED4*);
-extern  bool_t xdr_utf8val_REQUIRED4 (XDR *, utf8val_REQUIRED4*);
-extern  bool_t xdr_FedFsUuid (XDR *, FedFsUuid);
-extern  bool_t xdr_FedFsNsdbName (XDR *, FedFsNsdbName*);
-extern  bool_t xdr_FedFsPathComponent (XDR *, FedFsPathComponent*);
-extern  bool_t xdr_FedFsPathName (XDR *, FedFsPathName*);
-extern  bool_t xdr_FedFsFsn (XDR *, FedFsFsn*);
-extern  bool_t xdr_FedFsFslType (XDR *, FedFsFslType*);
-extern  bool_t xdr_FedFsNfsFsl (XDR *, FedFsNfsFsl*);
-extern  bool_t xdr_FedFsFsl (XDR *, FedFsFsl*);
-extern  bool_t xdr_FedFsPathType (XDR *, FedFsPathType*);
-extern  bool_t xdr_FedFsPath (XDR *, FedFsPath*);
-extern  bool_t xdr_FedFsCreateArgs (XDR *, FedFsCreateArgs*);
-extern  bool_t xdr_FedFsResolveType (XDR *, FedFsResolveType*);
-extern  bool_t xdr_FedFsLookupArgs (XDR *, FedFsLookupArgs*);
-extern  bool_t xdr_FedFsLookupResOk (XDR *, FedFsLookupResOk*);
-extern  bool_t xdr_FedFsLookupResReferralVal (XDR *, FedFsLookupResReferralVal*);
-extern  bool_t xdr_FedFsLookupRes (XDR *, FedFsLookupRes*);
-extern  bool_t xdr_FedFsConnectionSec (XDR *, FedFsConnectionSec*);
-extern  bool_t xdr_FedFsNsdbParams (XDR *, FedFsNsdbParams*);
-extern  bool_t xdr_FedFsSetNsdbParamsArgs (XDR *, FedFsSetNsdbParamsArgs*);
-extern  bool_t xdr_FedFsGetNsdbParamsRes (XDR *, FedFsGetNsdbParamsRes*);
-extern  bool_t xdr_FedFsGetLimitedNsdbParamsRes (XDR *, FedFsGetLimitedNsdbParamsRes*);
-
-#else /* K&R C */
-extern bool_t xdr_FedFsStatus ();
-extern bool_t xdr_utf8string ();
-extern bool_t xdr_ascii_REQUIRED4 ();
-extern bool_t xdr_utf8val_REQUIRED4 ();
-extern bool_t xdr_FedFsUuid ();
-extern bool_t xdr_FedFsNsdbName ();
-extern bool_t xdr_FedFsPathComponent ();
-extern bool_t xdr_FedFsPathName ();
-extern bool_t xdr_FedFsFsn ();
-extern bool_t xdr_FedFsFslType ();
-extern bool_t xdr_FedFsNfsFsl ();
-extern bool_t xdr_FedFsFsl ();
-extern bool_t xdr_FedFsPathType ();
-extern bool_t xdr_FedFsPath ();
-extern bool_t xdr_FedFsCreateArgs ();
-extern bool_t xdr_FedFsResolveType ();
-extern bool_t xdr_FedFsLookupArgs ();
-extern bool_t xdr_FedFsLookupResOk ();
-extern bool_t xdr_FedFsLookupResReferralVal ();
-extern bool_t xdr_FedFsLookupRes ();
-extern bool_t xdr_FedFsConnectionSec ();
-extern bool_t xdr_FedFsNsdbParams ();
-extern bool_t xdr_FedFsSetNsdbParamsArgs ();
-extern bool_t xdr_FedFsGetNsdbParamsRes ();
-extern bool_t xdr_FedFsGetLimitedNsdbParamsRes ();
-
-#endif /* K&R C */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !_FEDFS_ADMIN_H_RPCGEN */
support/include/junction.h +45 -2
index 67cf017..7257d80 100644
@@ -28,8 +28,51 @@
 
 #include <stdint.h>
 
-/* Machine-generated XDR definitions for FedFS Admin protocol */
-#include "fedfs_admin.h"
+/*
+ * The libjunction APIs use the status codes from the FedFS ADMIN
+ * protocol, which includes non-errno codes like FEDFS_ERR_NOTJUNCT.
+ */
+enum FedFsStatus {
+	FEDFS_OK = 0,
+	FEDFS_ERR_ACCESS = 1,
+	FEDFS_ERR_BADCHAR = 2,
+	FEDFS_ERR_BADNAME = 3,
+	FEDFS_ERR_NAMETOOLONG = 4,
+	FEDFS_ERR_LOOP = 5,
+	FEDFS_ERR_BADXDR = 6,
+	FEDFS_ERR_EXIST = 7,
+	FEDFS_ERR_INVAL = 8,
+	FEDFS_ERR_IO = 9,
+	FEDFS_ERR_NOSPC = 10,
+	FEDFS_ERR_NOTJUNCT = 11,
+	FEDFS_ERR_NOTLOCAL = 12,
+	FEDFS_ERR_PERM = 13,
+	FEDFS_ERR_ROFS = 14,
+	FEDFS_ERR_SVRFAULT = 15,
+	FEDFS_ERR_NOTSUPP = 16,
+	FEDFS_ERR_NSDB_ROUTE = 17,
+	FEDFS_ERR_NSDB_DOWN = 18,
+	FEDFS_ERR_NSDB_CONN = 19,
+	FEDFS_ERR_NSDB_AUTH = 20,
+	FEDFS_ERR_NSDB_LDAP = 21,
+	FEDFS_ERR_NSDB_LDAP_VAL = 22,
+	FEDFS_ERR_NSDB_NONCE = 23,
+	FEDFS_ERR_NSDB_NOFSN = 24,
+	FEDFS_ERR_NSDB_NOFSL = 25,
+	FEDFS_ERR_NSDB_RESPONSE = 26,
+	FEDFS_ERR_NSDB_FAULT = 27,
+	FEDFS_ERR_NSDB_PARAMS = 28,
+	FEDFS_ERR_NSDB_LDAP_REFERRAL = 29,
+	FEDFS_ERR_NSDB_LDAP_REFERRAL_VAL = 30,
+	FEDFS_ERR_NSDB_LDAP_REFERRAL_NOTFOLLOWED = 31,
+	FEDFS_ERR_NSDB_PARAMS_LDAP_REFERRAL = 32,
+	FEDFS_ERR_PATH_TYPE_UNSUPP = 33,
+	FEDFS_ERR_DELAY = 34,
+	FEDFS_ERR_NO_CACHE = 35,
+	FEDFS_ERR_UNKNOWN_CACHE = 36,
+	FEDFS_ERR_NO_CACHE_UPDATE = 37,
+};
+typedef enum FedFsStatus FedFsStatus;
 
 /**
  * Contains NFS fileset location information
support/junction/path.c +1 -0
index d33808f..68a1d13 100644
@@ -33,6 +33,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
+#include <dirent.h>
 
 #include <netinet/in.h>
 
utils/nfsref/add.c +1 -0
index d5d0cf8..781aeee 100644
@@ -29,6 +29,7 @@
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdlib.h>
+#include <string.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <errno.h>
utils/nfsref/nfsref.c +1 -0
index ff7013e..7f97d01 100644
@@ -33,6 +33,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
+#include <string.h>
 #include <fcntl.h>
 #include <getopt.h>
 #include <time.h>
#3 lore raw

Re: [PATCH 2/2] Remove fedfs_admin.h

Quoted 17 lines · Steve Dickson

=20
=20
=20

Quoted 10 lines · Chuck Lever

nfs-utils is not going to provide an implementation of the FedFS ADMIN protocol, so there's no need to include the entire .x file for that protocol.
=20
The only piece needed (for the moment) is the enum that defines the FEDFS_ERR codes, which are used by the internal and external libjunction APIs.
=20

Quoted 1 line

Committed...

Thanks!

fwiw, nfsref seems to be working fine. I still haven't tested the mountd piece.

Quoted 4 lines

steved.

Quoted 3 lines

---
support/include/Makefile.am | 1=20
support/include/fedfs_admin.h | 342 =

-----------------------------------------

Quoted 8 lines

=

Quoted 8 lines
support/include/junction.h    |   47 +++++-
support/junction/path.c       |    1=20
utils/nfsref/add.c            |    1=20
utils/nfsref/nfsref.c         |    1=20
6 files changed, 48 insertions(+), 345 deletions(-)

delete mode 100644 support/include/fedfs_admin.h
=20

= renamed from support/include/Makefile.am +0 -0

b/support/include/Makefile.am

Quoted 4 lines
Quoted 4 lines

index 11cb162..599f500 100644

support/include/Makefile.am +0 -0
@@ -5,7 +5,6 @@ SUBDIRS =3D nfs rpcsvc sys
Quoted 8 lines

=

Quoted 8 lines
support/include/Makefile.am +0 -1
 noinst_HEADERS =3D \
 	cld.h \
 	exportfs.h \
-	fedfs_admin.h \
 	ha-callout.h \
 	junction.h \
 	misc.h \
= renamed from support/include/fedfs_admin.h +0 -0

b/support/include/fedfs_admin.h

Quoted 204 lines
Quoted 204 lines

deleted file mode 100644
index d8b6715..0000000

support/include/fedfs_admin.h deleted +0 -199
@@ -1,342 +0,0 @@
-/*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
-
-#ifndef _FEDFS_ADMIN_H_RPCGEN
-#define _FEDFS_ADMIN_H_RPCGEN
-
-#include <rpc/rpc.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-enum FedFsStatus {
-	FEDFS_OK =3D 0,
-	FEDFS_ERR_ACCESS =3D 1,
-	FEDFS_ERR_BADCHAR =3D 2,
-	FEDFS_ERR_BADNAME =3D 3,
-	FEDFS_ERR_NAMETOOLONG =3D 4,
-	FEDFS_ERR_LOOP =3D 5,
-	FEDFS_ERR_BADXDR =3D 6,
-	FEDFS_ERR_EXIST =3D 7,
-	FEDFS_ERR_INVAL =3D 8,
-	FEDFS_ERR_IO =3D 9,
-	FEDFS_ERR_NOSPC =3D 10,
-	FEDFS_ERR_NOTJUNCT =3D 11,
-	FEDFS_ERR_NOTLOCAL =3D 12,
-	FEDFS_ERR_PERM =3D 13,
-	FEDFS_ERR_ROFS =3D 14,
-	FEDFS_ERR_SVRFAULT =3D 15,
-	FEDFS_ERR_NOTSUPP =3D 16,
-	FEDFS_ERR_NSDB_ROUTE =3D 17,
-	FEDFS_ERR_NSDB_DOWN =3D 18,
-	FEDFS_ERR_NSDB_CONN =3D 19,
-	FEDFS_ERR_NSDB_AUTH =3D 20,
-	FEDFS_ERR_NSDB_LDAP =3D 21,
-	FEDFS_ERR_NSDB_LDAP_VAL =3D 22,
-	FEDFS_ERR_NSDB_NONCE =3D 23,
-	FEDFS_ERR_NSDB_NOFSN =3D 24,
-	FEDFS_ERR_NSDB_NOFSL =3D 25,
-	FEDFS_ERR_NSDB_RESPONSE =3D 26,
-	FEDFS_ERR_NSDB_FAULT =3D 27,
-	FEDFS_ERR_NSDB_PARAMS =3D 28,
-	FEDFS_ERR_NSDB_LDAP_REFERRAL =3D 29,
-	FEDFS_ERR_NSDB_LDAP_REFERRAL_VAL =3D 30,
-	FEDFS_ERR_NSDB_LDAP_REFERRAL_NOTFOLLOWED =3D 31,
-	FEDFS_ERR_NSDB_PARAMS_LDAP_REFERRAL =3D 32,
-	FEDFS_ERR_PATH_TYPE_UNSUPP =3D 33,
-	FEDFS_ERR_DELAY =3D 34,
-	FEDFS_ERR_NO_CACHE =3D 35,
-	FEDFS_ERR_UNKNOWN_CACHE =3D 36,
-	FEDFS_ERR_NO_CACHE_UPDATE =3D 37,
-};
-typedef enum FedFsStatus FedFsStatus;
-
-typedef struct {
-	u_int utf8string_len;
-	char *utf8string_val;
-} utf8string;
-
-typedef utf8string ascii_REQUIRED4;
-
-typedef utf8string utf8val_REQUIRED4;
-
-typedef char FedFsUuid[16];
-
-struct FedFsNsdbName {
-	u_int port;
-	utf8val_REQUIRED4 hostname;
-};
-typedef struct FedFsNsdbName FedFsNsdbName;
-
-typedef ascii_REQUIRED4 FedFsPathComponent;
-
-typedef struct {
-	u_int FedFsPathName_len;
-	FedFsPathComponent *FedFsPathName_val;
-} FedFsPathName;
-
-struct FedFsFsn {
-	FedFsUuid fsnUuid;
-	FedFsNsdbName nsdbName;
-};
-typedef struct FedFsFsn FedFsFsn;
-
-enum FedFsFslType {
-	FEDFS_NFS_FSL =3D 0,
-};
-typedef enum FedFsFslType FedFsFslType;
-
-struct FedFsNfsFsl {
-	FedFsUuid fslUuid;
-	u_int port;
-	utf8val_REQUIRED4 hostname;
-	FedFsPathName path;
-};
-typedef struct FedFsNfsFsl FedFsNfsFsl;
-
-struct FedFsFsl {
-	FedFsFslType type;
-	union {
-		FedFsNfsFsl nfsFsl;
-	} FedFsFsl_u;
-};
-typedef struct FedFsFsl FedFsFsl;
-
-enum FedFsPathType {
-	FEDFS_PATH_SYS =3D 0,
-	FEDFS_PATH_NFS =3D 1,
-};
-typedef enum FedFsPathType FedFsPathType;
-
-struct FedFsPath {
-	FedFsPathType type;
-	union {
-		FedFsPathName adminPath;
-		FedFsPathName nfsPath;
-	} FedFsPath_u;
-};
-typedef struct FedFsPath FedFsPath;
-
-struct FedFsCreateArgs {
-	FedFsPath path;
-	FedFsFsn fsn;
-};
-typedef struct FedFsCreateArgs FedFsCreateArgs;
-
-enum FedFsResolveType {
-	FEDFS_RESOLVE_NONE =3D 0,
-	FEDFS_RESOLVE_CACHE =3D 1,
-	FEDFS_RESOLVE_NSDB =3D 2,
-};
-typedef enum FedFsResolveType FedFsResolveType;
-
-struct FedFsLookupArgs {
-	FedFsPath path;
-	FedFsResolveType resolve;
-};
-typedef struct FedFsLookupArgs FedFsLookupArgs;
-
-struct FedFsLookupResOk {
-	FedFsFsn fsn;
-	struct {
-		u_int fsl_len;
-		FedFsFsl *fsl_val;
-	} fsl;
-};
-typedef struct FedFsLookupResOk FedFsLookupResOk;
-
-struct FedFsLookupResReferralVal {
-	FedFsNsdbName targetNsdb;
-	u_int ldapResultCode;
-};
-typedef struct FedFsLookupResReferralVal FedFsLookupResReferralVal;
-
-struct FedFsLookupRes {
-	FedFsStatus status;
-	union {
-		FedFsLookupResOk resok;
-		u_int ldapResultCode;
-		FedFsNsdbName targetNsdb;
-		FedFsLookupResReferralVal resReferralVal;
-	} FedFsLookupRes_u;
-};
-typedef struct FedFsLookupRes FedFsLookupRes;
-
-enum FedFsConnectionSec {
-	FEDFS_SEC_NONE =3D 0,
-	FEDFS_SEC_TLS =3D 1,
-};
-typedef enum FedFsConnectionSec FedFsConnectionSec;
-
-struct FedFsNsdbParams {
-	FedFsConnectionSec secType;
-	union {
-		struct {
-			u_int secData_len;
-			char *secData_val;
-		} secData;
-	} FedFsNsdbParams_u;
-};
-typedef struct FedFsNsdbParams FedFsNsdbParams;
-
-struct FedFsSetNsdbParamsArgs {
-	FedFsNsdbName nsdbName;
-	FedFsNsdbParams params;
-};
-typedef struct FedFsSetNsdbParamsArgs FedFsSetNsdbParamsArgs;
-
-struct FedFsGetNsdbParamsRes {
-	FedFsStatus status;
-	union {
-		FedFsNsdbParams params;
-	} FedFsGetNsdbParamsRes_u;
-};
-typedef struct FedFsGetNsdbParamsRes FedFsGetNsdbParamsRes;
Quoted 8 lines

support/include/fedfs_admin.h

Quoted 8 lines
support/include/fedfs_admin.h deleted +0 -8
-
-struct FedFsGetLimitedNsdbParamsRes {
-	FedFsStatus status;
-	union {
-		FedFsConnectionSec secType;
-	} FedFsGetLimitedNsdbParamsRes_u;
-};
-typedef struct FedFsGetLimitedNsdbParamsRes =

FedFsGetLimitedNsdbParamsRes;

Quoted 11 lines

support/include/fedfs_admin.h

Quoted 11 lines
support/include/fedfs_admin.h deleted +0 -11
-#define FEDFS_ADMIN_X
-
-#define FEDFS_PROG 100418
-#define FEDFS_V1 1
-
-#if defined(__STDC__) || defined(__cplusplus)
-#define FEDFS_NULL 0
-extern  void * fedfs_null_1(void *, CLIENT *);
-extern  void * fedfs_null_1_svc(void *, struct svc_req *);
-#define FEDFS_CREATE_JUNCTION 1
-extern  FedFsStatus * fedfs_create_junction_1(FedFsCreateArgs *, =

CLIENT *);

Quoted 1 line

support/include/fedfs_admin.h line 219

Quoted 1 line
support/include/fedfs_admin.h deleted +0 -1
-extern  FedFsStatus * fedfs_create_junction_1_svc(FedFsCreateArgs *, =

struct svc_req *);

Quoted 2 lines

support/include/fedfs_admin.h line 221

Quoted 2 lines
support/include/fedfs_admin.h deleted +0 -2
-#define FEDFS_DELETE_JUNCTION 2
-extern  FedFsStatus * fedfs_delete_junction_1(FedFsPath *, CLIENT =

*);

Quoted 1 line

support/include/fedfs_admin.h line 222

Quoted 1 line
support/include/fedfs_admin.h deleted +0 -1
-extern  FedFsStatus * fedfs_delete_junction_1_svc(FedFsPath *, =

struct svc_req *);

Quoted 2 lines

support/include/fedfs_admin.h line 224

Quoted 2 lines
support/include/fedfs_admin.h deleted +0 -2
-#define FEDFS_LOOKUP_JUNCTION 3
-extern  FedFsLookupRes * fedfs_lookup_junction_1(FedFsLookupArgs *, =

CLIENT *);

Quoted 1 line

support/include/fedfs_admin.h line 225

Quoted 1 line
support/include/fedfs_admin.h deleted +0 -1
-extern  FedFsLookupRes * fedfs_lookup_junction_1_svc(FedFsLookupArgs =

*, struct svc_req *);

Quoted 2 lines

support/include/fedfs_admin.h line 227

Quoted 2 lines
support/include/fedfs_admin.h deleted +0 -2
-#define FEDFS_CREATE_REPLICATION 7
-extern  FedFsStatus * fedfs_create_replication_1(FedFsCreateArgs *, =

CLIENT *);

Quoted 1 line

support/include/fedfs_admin.h line 228

Quoted 1 line
support/include/fedfs_admin.h deleted +0 -1
-extern  FedFsStatus * fedfs_create_replication_1_svc(FedFsCreateArgs =

*, struct svc_req *);

Quoted 2 lines

support/include/fedfs_admin.h line 230

Quoted 2 lines
support/include/fedfs_admin.h deleted +0 -2
-#define FEDFS_DELETE_REPLICATION 8
-extern  FedFsStatus * fedfs_delete_replication_1(FedFsPath *, CLIENT =

*);

Quoted 1 line

support/include/fedfs_admin.h line 231

Quoted 1 line
support/include/fedfs_admin.h deleted +0 -1
-extern  FedFsStatus * fedfs_delete_replication_1_svc(FedFsPath *, =

struct svc_req *);

Quoted 2 lines

support/include/fedfs_admin.h line 233

Quoted 2 lines
support/include/fedfs_admin.h deleted +0 -2
-#define FEDFS_LOOKUP_REPLICATION 9
-extern  FedFsLookupRes * fedfs_lookup_replication_1(FedFsLookupArgs =

*, CLIENT *);

Quoted 1 line

support/include/fedfs_admin.h line 234

Quoted 1 line
support/include/fedfs_admin.h deleted +0 -1
-extern  FedFsLookupRes * =

fedfs_lookup_replication_1_svc(FedFsLookupArgs *, struct svc_req *);

Quoted 2 lines

support/include/fedfs_admin.h line 236

Quoted 2 lines
support/include/fedfs_admin.h deleted +0 -2
-#define FEDFS_SET_NSDB_PARAMS 4
-extern  FedFsStatus * fedfs_set_nsdb_params_1(FedFsSetNsdbParamsArgs =

*, CLIENT *);

Quoted 1 line

support/include/fedfs_admin.h line 237

Quoted 1 line
support/include/fedfs_admin.h deleted +0 -1
-extern  FedFsStatus * =

fedfs_set_nsdb_params_1_svc(FedFsSetNsdbParamsArgs *, struct svc_req *);

Quoted 2 lines

support/include/fedfs_admin.h line 239

Quoted 2 lines
support/include/fedfs_admin.h deleted +0 -2
-#define FEDFS_GET_NSDB_PARAMS 5
-extern  FedFsGetNsdbParamsRes * =

fedfs_get_nsdb_params_1(FedFsNsdbName *, CLIENT *);

Quoted 1 line

support/include/fedfs_admin.h line 240

Quoted 1 line
support/include/fedfs_admin.h deleted +0 -1
-extern  FedFsGetNsdbParamsRes * =

fedfs_get_nsdb_params_1_svc(FedFsNsdbName *, struct svc_req *);

Quoted 2 lines

support/include/fedfs_admin.h line 242

Quoted 2 lines
support/include/fedfs_admin.h deleted +0 -2
-#define FEDFS_GET_LIMITED_NSDB_PARAMS 6
-extern  FedFsGetLimitedNsdbParamsRes * =

fedfs_get_limited_nsdb_params_1(FedFsNsdbName *, CLIENT *);

Quoted 1 line

support/include/fedfs_admin.h line 243

Quoted 1 line
support/include/fedfs_admin.h deleted +0 -1
-extern  FedFsGetLimitedNsdbParamsRes * =

fedfs_get_limited_nsdb_params_1_svc(FedFsNsdbName *, struct svc_req *);

Quoted 24 lines
Quoted 24 lines
support/include/fedfs_admin.h deleted +0 -24
-extern int fedfs_prog_1_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
-
-#else /* K&R C */
-#define FEDFS_NULL 0
-extern  void * fedfs_null_1();
-extern  void * fedfs_null_1_svc();
-#define FEDFS_CREATE_JUNCTION 1
-extern  FedFsStatus * fedfs_create_junction_1();
-extern  FedFsStatus * fedfs_create_junction_1_svc();
-#define FEDFS_DELETE_JUNCTION 2
-extern  FedFsStatus * fedfs_delete_junction_1();
-extern  FedFsStatus * fedfs_delete_junction_1_svc();
-#define FEDFS_LOOKUP_JUNCTION 3
-extern  FedFsLookupRes * fedfs_lookup_junction_1();
-extern  FedFsLookupRes * fedfs_lookup_junction_1_svc();
-#define FEDFS_CREATE_REPLICATION 7
-extern  FedFsStatus * fedfs_create_replication_1();
-extern  FedFsStatus * fedfs_create_replication_1_svc();
-#define FEDFS_DELETE_REPLICATION 8
-extern  FedFsStatus * fedfs_delete_replication_1();
-extern  FedFsStatus * fedfs_delete_replication_1_svc();
-#define FEDFS_LOOKUP_REPLICATION 9
-extern  FedFsLookupRes * fedfs_lookup_replication_1();
-extern  FedFsLookupRes * fedfs_lookup_replication_1_svc();
Quoted 8 lines

support/include/fedfs_admin.h

Quoted 8 lines
support/include/fedfs_admin.h deleted +0 -8
-#define FEDFS_SET_NSDB_PARAMS 4
-extern  FedFsStatus * fedfs_set_nsdb_params_1();
-extern  FedFsStatus * fedfs_set_nsdb_params_1_svc();
-#define FEDFS_GET_NSDB_PARAMS 5
-extern  FedFsGetNsdbParamsRes * fedfs_get_nsdb_params_1();
-extern  FedFsGetNsdbParamsRes * fedfs_get_nsdb_params_1_svc();
-#define FEDFS_GET_LIMITED_NSDB_PARAMS 6
-extern  FedFsGetLimitedNsdbParamsRes * =

fedfs_get_limited_nsdb_params_1();

Quoted 1 line

support/include/fedfs_admin.h line 276

Quoted 1 line
support/include/fedfs_admin.h deleted +0 -1
-extern  FedFsGetLimitedNsdbParamsRes * =

fedfs_get_limited_nsdb_params_1_svc();

Quoted 17 lines
Quoted 17 lines
support/include/fedfs_admin.h deleted +0 -17
-extern int fedfs_prog_1_freeresult ();
-#endif /* K&R C */
-
-/* the xdr functions */
-
-#if defined(__STDC__) || defined(__cplusplus)
-extern  bool_t xdr_FedFsStatus (XDR *, FedFsStatus*);
-extern  bool_t xdr_utf8string (XDR *, utf8string*);
-extern  bool_t xdr_ascii_REQUIRED4 (XDR *, ascii_REQUIRED4*);
-extern  bool_t xdr_utf8val_REQUIRED4 (XDR *, utf8val_REQUIRED4*);
-extern  bool_t xdr_FedFsUuid (XDR *, FedFsUuid);
-extern  bool_t xdr_FedFsNsdbName (XDR *, FedFsNsdbName*);
-extern  bool_t xdr_FedFsPathComponent (XDR *, FedFsPathComponent*);
-extern  bool_t xdr_FedFsPathName (XDR *, FedFsPathName*);
-extern  bool_t xdr_FedFsFsn (XDR *, FedFsFsn*);
-extern  bool_t xdr_FedFsFslType (XDR *, FedFsFslType*);
-extern  bool_t xdr_FedFsNfsFsl (XDR *, FedFsNfsFsl*);
Quoted 8 lines

support/include/fedfs_admin.h

Quoted 8 lines
support/include/fedfs_admin.h deleted +0 -8
-extern  bool_t xdr_FedFsFsl (XDR *, FedFsFsl*);
-extern  bool_t xdr_FedFsPathType (XDR *, FedFsPathType*);
-extern  bool_t xdr_FedFsPath (XDR *, FedFsPath*);
-extern  bool_t xdr_FedFsCreateArgs (XDR *, FedFsCreateArgs*);
-extern  bool_t xdr_FedFsResolveType (XDR *, FedFsResolveType*);
-extern  bool_t xdr_FedFsLookupArgs (XDR *, FedFsLookupArgs*);
-extern  bool_t xdr_FedFsLookupResOk (XDR *, FedFsLookupResOk*);
-extern  bool_t xdr_FedFsLookupResReferralVal (XDR *, =

FedFsLookupResReferralVal*);

Quoted 4 lines

support/include/fedfs_admin.h

Quoted 4 lines
support/include/fedfs_admin.h deleted +0 -4
-extern  bool_t xdr_FedFsLookupRes (XDR *, FedFsLookupRes*);
-extern  bool_t xdr_FedFsConnectionSec (XDR *, FedFsConnectionSec*);
-extern  bool_t xdr_FedFsNsdbParams (XDR *, FedFsNsdbParams*);
-extern  bool_t xdr_FedFsSetNsdbParamsArgs (XDR *, =

FedFsSetNsdbParamsArgs*);

Quoted 1 line

support/include/fedfs_admin.h line 306

Quoted 1 line
support/include/fedfs_admin.h deleted +0 -1
-extern  bool_t xdr_FedFsGetNsdbParamsRes (XDR *, =

FedFsGetNsdbParamsRes*);

Quoted 1 line

support/include/fedfs_admin.h line 307

Quoted 1 line
support/include/fedfs_admin.h deleted +0 -1
-extern  bool_t xdr_FedFsGetLimitedNsdbParamsRes (XDR *, =

FedFsGetLimitedNsdbParamsRes*);

Quoted 124 lines
Quoted 124 lines
support/include/fedfs_admin.h deleted +0 -35
-
-#else /* K&R C */
-extern bool_t xdr_FedFsStatus ();
-extern bool_t xdr_utf8string ();
-extern bool_t xdr_ascii_REQUIRED4 ();
-extern bool_t xdr_utf8val_REQUIRED4 ();
-extern bool_t xdr_FedFsUuid ();
-extern bool_t xdr_FedFsNsdbName ();
-extern bool_t xdr_FedFsPathComponent ();
-extern bool_t xdr_FedFsPathName ();
-extern bool_t xdr_FedFsFsn ();
-extern bool_t xdr_FedFsFslType ();
-extern bool_t xdr_FedFsNfsFsl ();
-extern bool_t xdr_FedFsFsl ();
-extern bool_t xdr_FedFsPathType ();
-extern bool_t xdr_FedFsPath ();
-extern bool_t xdr_FedFsCreateArgs ();
-extern bool_t xdr_FedFsResolveType ();
-extern bool_t xdr_FedFsLookupArgs ();
-extern bool_t xdr_FedFsLookupResOk ();
-extern bool_t xdr_FedFsLookupResReferralVal ();
-extern bool_t xdr_FedFsLookupRes ();
-extern bool_t xdr_FedFsConnectionSec ();
-extern bool_t xdr_FedFsNsdbParams ();
-extern bool_t xdr_FedFsSetNsdbParamsArgs ();
-extern bool_t xdr_FedFsGetNsdbParamsRes ();
-extern bool_t xdr_FedFsGetLimitedNsdbParamsRes ();
-
-#endif /* K&R C */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !_FEDFS_ADMIN_H_RPCGEN */
support/include/junction.h +0 -0
index 67cf017..7257d80 100644
@@ -28,8 +28,51 @@

=20
#include <stdint.h>
=20

support/include/junction.h +45 -2
-/* Machine-generated XDR definitions for FedFS Admin protocol */
-#include "fedfs_admin.h"
+/*
+ * The libjunction APIs use the status codes from the FedFS ADMIN
+ * protocol, which includes non-errno codes like FEDFS_ERR_NOTJUNCT.
+ */
+enum FedFsStatus {
+	FEDFS_OK =3D 0,
+	FEDFS_ERR_ACCESS =3D 1,
+	FEDFS_ERR_BADCHAR =3D 2,
+	FEDFS_ERR_BADNAME =3D 3,
+	FEDFS_ERR_NAMETOOLONG =3D 4,
+	FEDFS_ERR_LOOP =3D 5,
+	FEDFS_ERR_BADXDR =3D 6,
+	FEDFS_ERR_EXIST =3D 7,
+	FEDFS_ERR_INVAL =3D 8,
+	FEDFS_ERR_IO =3D 9,
+	FEDFS_ERR_NOSPC =3D 10,
+	FEDFS_ERR_NOTJUNCT =3D 11,
+	FEDFS_ERR_NOTLOCAL =3D 12,
+	FEDFS_ERR_PERM =3D 13,
+	FEDFS_ERR_ROFS =3D 14,
+	FEDFS_ERR_SVRFAULT =3D 15,
+	FEDFS_ERR_NOTSUPP =3D 16,
+	FEDFS_ERR_NSDB_ROUTE =3D 17,
+	FEDFS_ERR_NSDB_DOWN =3D 18,
+	FEDFS_ERR_NSDB_CONN =3D 19,
+	FEDFS_ERR_NSDB_AUTH =3D 20,
+	FEDFS_ERR_NSDB_LDAP =3D 21,
+	FEDFS_ERR_NSDB_LDAP_VAL =3D 22,
+	FEDFS_ERR_NSDB_NONCE =3D 23,
+	FEDFS_ERR_NSDB_NOFSN =3D 24,
+	FEDFS_ERR_NSDB_NOFSL =3D 25,
+	FEDFS_ERR_NSDB_RESPONSE =3D 26,
+	FEDFS_ERR_NSDB_FAULT =3D 27,
+	FEDFS_ERR_NSDB_PARAMS =3D 28,
+	FEDFS_ERR_NSDB_LDAP_REFERRAL =3D 29,
+	FEDFS_ERR_NSDB_LDAP_REFERRAL_VAL =3D 30,
+	FEDFS_ERR_NSDB_LDAP_REFERRAL_NOTFOLLOWED =3D 31,
+	FEDFS_ERR_NSDB_PARAMS_LDAP_REFERRAL =3D 32,
+	FEDFS_ERR_PATH_TYPE_UNSUPP =3D 33,
+	FEDFS_ERR_DELAY =3D 34,
+	FEDFS_ERR_NO_CACHE =3D 35,
+	FEDFS_ERR_UNKNOWN_CACHE =3D 36,
+	FEDFS_ERR_NO_CACHE_UPDATE =3D 37,
+};
+typedef enum FedFsStatus FedFsStatus;

=20
/**
* Contains NFS fileset location information

support/junction/path.c +1 -0
index d33808f..68a1d13 100644
@@ -33,6 +33,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
+#include <dirent.h>

=20
#include <netinet/in.h>
=20

utils/nfsref/add.c +1 -0
index d5d0cf8..781aeee 100644
@@ -29,6 +29,7 @@
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdlib.h>
+#include <string.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <errno.h>
utils/nfsref/nfsref.c +0 -0
index ff7013e..7f97d01 100644
@@ -33,6 +33,7 @@
 #include <stdlib.h>
 #include <stdio.h>
Quoted 8 lines
Quoted 6 lines
utils/nfsref/nfsref.c +1 -0
 #include <unistd.h>
+#include <string.h>
 #include <fcntl.h>
 #include <getopt.h>
 #include <time.h>

=20

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" =

in

Quoted 2 lines

the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
Chuck Lever

#4 lore raw
In reply to Chuck Lever
Quoted 6 lines · Chuck Lever

This is a display helper function that is not needed in nfs-utils because nfs-utils does not implement the FedFS ADMIN protocol (and therefore does not need to display ADMIN protocol-related security settings).

Committed...

steved.

Quoted 49 lines
---
 support/include/junction.h |    1 -
 support/junction/display.c |   20 --------------------
 2 files changed, 21 deletions(-)
support/include/junction.h +0 -1
index a5f3844..67cf017 100644
@@ -118,7 +118,6 @@ FedFsStatus	 nsdb_posix_to_path_array(const char *pathname,
  ** Readability helpers
  **/
 
-const char      *nsdb_display_fedfsconnectionsec(const FedFsConnectionSec sectype);
 const char      *nsdb_display_fedfsstatus(const FedFsStatus status);
 void             nsdb_print_fedfsstatus(const FedFsStatus status);
 
support/junction/display.c +0 -20
index 77b131f..e1e1af1 100644
@@ -32,26 +32,6 @@
 #include "junction.h"
 
 /**
- * Return human-readable equivalent of a FedFsConnectionSec value
- *
- * @param sectype FedFsConneccionSec value
- * @return a static NUL-terminated C string
- */
-const char *
-nsdb_display_fedfsconnectionsec(const FedFsConnectionSec sectype)
-{
-	switch (sectype) {
-	case FEDFS_SEC_NONE:
-		return "FEDFS_SEC_NONE";
-	case FEDFS_SEC_TLS:
-		return "FEDFS_SEC_TLS";
-	default:
-		break;
-	}
-	return "unrecognized security type";
-}
-
-/**
  * Return human-readable equivalent of a FedFsStatus value
  *
  * @param status FedFsStatus code