[PATCH 2/2] Temporary fix for build issue for mount util.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 support/include/exportfs.h | 1 -
 support/nfs/exports.c      | 8 +++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/support/include/exportfs.h b/support/include/exportfs.h
index c65e2a1c..9edf0d04 100644
--- a/support/include/exportfs.h
+++ b/support/include/exportfs.h
@@ -173,7 +173,6 @@ struct export_features {
  struct export_features *get_export_features(void);
 void fix_pseudoflavor_flags(struct exportent *ep);
-void exportent_free_realpath(struct exportent*);
 char *exportent_realpath(struct exportent *eep);
 int export_test(struct exportent *eep, int with_fsid);
 diff --git a/support/nfs/exports.c b/support/nfs/exports.c
index c8ce8566..ec361486 100644
--- a/support/nfs/exports.c
+++ b/support/nfs/exports.c
@@ -67,6 +67,12 @@ static void	freesquash(void);
 static void	syntaxerr(char *msg);
 static struct flav_info *find_flavor(char *name);
 +static void
+exportent_free_realpath(struct exportent* eep){
+        if (eep->e_realpath && eep->e_realpath != eep->e_path)
+                free(eep->e_realpath);
+};
+
 void
 setexportent(char *fname, char *type)
 {
@@ -191,7 +197,7 @@ getexportent(int fromkernel)
  	/* resolve symlinks */
 	if (nfsd_realpath(ee.e_path, rpath) == NULL) {
- xlog(L_ERROR, "realpath(): Unable to resolve path at %s", ee.e_path); + xlog(L_ERROR, "nfsd_realpath(): to resolve path at %s", ee.e_path);
                 goto out;
         };
 -- 2.47.1





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux