2018-02-08 17:13:32

by Chuck Lever III

[permalink] [raw]
Subject: [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).

Signed-off-by: Chuck Lever <[email protected]>
---
support/include/junction.h | 1 -
support/junction/display.c | 20 --------------------
2 files changed, 21 deletions(-)

diff --git a/support/include/junction.h b/support/include/junction.h
index a5f3844..67cf017 100644
--- a/support/include/junction.h
+++ b/support/include/junction.h
@@ -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);

diff --git a/support/junction/display.c b/support/junction/display.c
index 77b131f..e1e1af1 100644
--- a/support/junction/display.c
+++ b/support/junction/display.c
@@ -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



2018-02-08 17:13:42

by Chuck Lever III

[permalink] [raw]
Subject: [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.

Suggested-by: Neil Brown <[email protected]>
Signed-off-by: Chuck Lever <[email protected]>
---
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

diff --git a/support/include/Makefile.am b/support/include/Makefile.am
index 11cb162..599f500 100644
--- a/support/include/Makefile.am
+++ b/support/include/Makefile.am
@@ -5,7 +5,6 @@ SUBDIRS = nfs rpcsvc sys
noinst_HEADERS = \
cld.h \
exportfs.h \
- fedfs_admin.h \
ha-callout.h \
junction.h \
misc.h \
diff --git a/support/include/fedfs_admin.h b/support/include/fedfs_admin.h
deleted file mode 100644
index d8b6715..0000000
--- a/support/include/fedfs_admin.h
+++ /dev/null
@@ -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 */
diff --git a/support/include/junction.h b/support/include/junction.h
index 67cf017..7257d80 100644
--- a/support/include/junction.h
+++ b/support/include/junction.h
@@ -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
diff --git a/support/junction/path.c b/support/junction/path.c
index d33808f..68a1d13 100644
--- a/support/junction/path.c
+++ b/support/junction/path.c
@@ -33,6 +33,7 @@
#include <stdio.h>
#include <string.h>
#include <errno.h>
+#include <dirent.h>

#include <netinet/in.h>

diff --git a/utils/nfsref/add.c b/utils/nfsref/add.c
index d5d0cf8..781aeee 100644
--- a/utils/nfsref/add.c
+++ b/utils/nfsref/add.c
@@ -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>
diff --git a/utils/nfsref/nfsref.c b/utils/nfsref/nfsref.c
index ff7013e..7f97d01 100644
--- a/utils/nfsref/nfsref.c
+++ b/utils/nfsref/nfsref.c
@@ -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>


2018-02-13 14:24:25

by Steve Dickson

[permalink] [raw]
Subject: Re: [PATCH 1/2] Remove nsdb_display_fedfsconnectionsec()



On 02/08/2018 12:13 PM, Chuck Lever wrote:
> 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).
>
> Signed-off-by: Chuck Lever <[email protected]>
Committed...

steved.

> ---
> support/include/junction.h | 1 -
> support/junction/display.c | 20 --------------------
> 2 files changed, 21 deletions(-)
>
> diff --git a/support/include/junction.h b/support/include/junction.h
> index a5f3844..67cf017 100644
> --- a/support/include/junction.h
> +++ b/support/include/junction.h
> @@ -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);
>
> diff --git a/support/junction/display.c b/support/junction/display.c
> index 77b131f..e1e1af1 100644
> --- a/support/junction/display.c
> +++ b/support/junction/display.c
> @@ -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
>

2018-02-13 14:24:55

by Steve Dickson

[permalink] [raw]
Subject: Re: [PATCH 2/2] Remove fedfs_admin.h



On 02/08/2018 12:13 PM, Chuck Lever wrote:
> 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.
>
> Suggested-by: Neil Brown <[email protected]>
> Signed-off-by: Chuck Lever <[email protected]>
Committed...

steved.
> ---
> 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
>
> diff --git a/support/include/Makefile.am b/support/include/Makefile.am
> index 11cb162..599f500 100644
> --- a/support/include/Makefile.am
> +++ b/support/include/Makefile.am
> @@ -5,7 +5,6 @@ SUBDIRS = nfs rpcsvc sys
> noinst_HEADERS = \
> cld.h \
> exportfs.h \
> - fedfs_admin.h \
> ha-callout.h \
> junction.h \
> misc.h \
> diff --git a/support/include/fedfs_admin.h b/support/include/fedfs_admin.h
> deleted file mode 100644
> index d8b6715..0000000
> --- a/support/include/fedfs_admin.h
> +++ /dev/null
> @@ -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 */
> diff --git a/support/include/junction.h b/support/include/junction.h
> index 67cf017..7257d80 100644
> --- a/support/include/junction.h
> +++ b/support/include/junction.h
> @@ -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
> diff --git a/support/junction/path.c b/support/junction/path.c
> index d33808f..68a1d13 100644
> --- a/support/junction/path.c
> +++ b/support/junction/path.c
> @@ -33,6 +33,7 @@
> #include <stdio.h>
> #include <string.h>
> #include <errno.h>
> +#include <dirent.h>
>
> #include <netinet/in.h>
>
> diff --git a/utils/nfsref/add.c b/utils/nfsref/add.c
> index d5d0cf8..781aeee 100644
> --- a/utils/nfsref/add.c
> +++ b/utils/nfsref/add.c
> @@ -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>
> diff --git a/utils/nfsref/nfsref.c b/utils/nfsref/nfsref.c
> index ff7013e..7f97d01 100644
> --- a/utils/nfsref/nfsref.c
> +++ b/utils/nfsref/nfsref.c
> @@ -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>
>

2018-02-13 15:23:50

by Chuck Lever III

[permalink] [raw]
Subject: Re: [PATCH 2/2] Remove fedfs_admin.h



> On Feb 13, 2018, at 9:24 AM, Steve Dickson <[email protected]> wrote:
>=20
>=20
>=20
> On 02/08/2018 12:13 PM, Chuck Lever wrote:
>> 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
>> Suggested-by: Neil Brown <[email protected]>
>> Signed-off-by: Chuck Lever <[email protected]>
> Committed...

Thanks!

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


> steved.
>> ---
>> support/include/Makefile.am | 1=20
>> support/include/fedfs_admin.h | 342 =
-----------------------------------------
>> 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
>> diff --git a/support/include/Makefile.am =
b/support/include/Makefile.am
>> index 11cb162..599f500 100644
>> --- a/support/include/Makefile.am
>> +++ b/support/include/Makefile.am
>> @@ -5,7 +5,6 @@ SUBDIRS =3D nfs rpcsvc sys
>> noinst_HEADERS =3D \
>> cld.h \
>> exportfs.h \
>> - fedfs_admin.h \
>> ha-callout.h \
>> junction.h \
>> misc.h \
>> diff --git a/support/include/fedfs_admin.h =
b/support/include/fedfs_admin.h
>> deleted file mode 100644
>> index d8b6715..0000000
>> --- a/support/include/fedfs_admin.h
>> +++ /dev/null
>> @@ -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;
>> -
>> -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 */
>> diff --git a/support/include/junction.h b/support/include/junction.h
>> index 67cf017..7257d80 100644
>> --- a/support/include/junction.h
>> +++ b/support/include/junction.h
>> @@ -28,8 +28,51 @@
>>=20
>> #include <stdint.h>
>>=20
>> -/* 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
>> diff --git a/support/junction/path.c b/support/junction/path.c
>> index d33808f..68a1d13 100644
>> --- a/support/junction/path.c
>> +++ b/support/junction/path.c
>> @@ -33,6 +33,7 @@
>> #include <stdio.h>
>> #include <string.h>
>> #include <errno.h>
>> +#include <dirent.h>
>>=20
>> #include <netinet/in.h>
>>=20
>> diff --git a/utils/nfsref/add.c b/utils/nfsref/add.c
>> index d5d0cf8..781aeee 100644
>> --- a/utils/nfsref/add.c
>> +++ b/utils/nfsref/add.c
>> @@ -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>
>> diff --git a/utils/nfsref/nfsref.c b/utils/nfsref/nfsref.c
>> index ff7013e..7f97d01 100644
>> --- a/utils/nfsref/nfsref.c
>> +++ b/utils/nfsref/nfsref.c
>> @@ -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>
>>=20
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" =
in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

--
Chuck Lever