[nfs-utils/f21] Added fix to umount in the nfs-utils-1.3.2-rc1.patch

Steve Dickson steved at fedoraproject.org
Fri Oct 24 13:49:06 UTC 2014


commit 8a437182d37c0984b650d3179284efb19bfd6589
Author: Steve Dickson <steved at redhat.com>
Date:   Fri Oct 24 09:36:40 2014 -0400

    Added fix to umount in the nfs-utils-1.3.2-rc1.patch
    
    Signed-off-by: Steve Dickson <steved at redhat.com>

 nfs-utils-1.3.2-rc1.patch |   46 +++++++++++++++++++++++++++++++++++++++++++++
 nfs-utils.spec            |    5 +++-
 2 files changed, 50 insertions(+), 1 deletions(-)
---
diff --git a/nfs-utils-1.3.2-rc1.patch b/nfs-utils-1.3.2-rc1.patch
index 7a802fc..67cde7d 100644
--- a/nfs-utils-1.3.2-rc1.patch
+++ b/nfs-utils-1.3.2-rc1.patch
@@ -56,6 +56,52 @@ index 1048c5c..8010aad 100644
  Wants=nfs-config.service
  After=nfs-config.service
  
+diff --git a/utils/mount/mount_libmount.c b/utils/mount/mount_libmount.c
+index 6f85dc9..fa46d54 100644
+--- a/utils/mount/mount_libmount.c
++++ b/utils/mount/mount_libmount.c
+@@ -174,7 +174,7 @@ static int umount_main(struct libmnt_context *cxt, int argc, char **argv)
+ {
+ 	int rc, c;
+ 	char *spec = NULL, *opts = NULL;
+-	int ret = EX_FAIL;
++	int ret = EX_FAIL, verbose = 0;
+ 
+ 	static const struct option longopts[] = {
+ 		{ "force", 0, 0, 'f' },
+@@ -201,6 +201,8 @@ static int umount_main(struct libmnt_context *cxt, int argc, char **argv)
+ 		return EX_USAGE;
+ 	}
+ 
++	verbose = mnt_context_is_verbose(cxt);
++
+ 	if (optind < argc)
+ 		spec = argv[optind++];
+ 
+@@ -228,6 +230,10 @@ static int umount_main(struct libmnt_context *cxt, int argc, char **argv)
+ 		goto err;
+ 	}
+ 
++	if (verbose)
++		printf(_("%s: %s mount point detected\n"), spec,
++					mnt_context_get_fstype(cxt));
++
+ 	opts = retrieve_mount_options(mnt_context_get_fs(cxt));
+ 
+ 	if (!mnt_context_is_lazy(cxt)) {
+@@ -263,6 +269,12 @@ static int umount_main(struct libmnt_context *cxt, int argc, char **argv)
+ 	}
+ 	ret = EX_SUCCESS;
+ err:
++	if (verbose) {
++		if (ret == EX_SUCCESS)
++			printf(_("%s: umounted\n"), spec);
++		else
++			printf(_("%s: umount failed\n"), spec);
++	}
+ 	free(opts);
+ 	return ret;
+ }
 diff --git a/utils/nfsstat/nfsstat.c b/utils/nfsstat/nfsstat.c
 index 18e4d27..9f481db 100644
 --- a/utils/nfsstat/nfsstat.c
diff --git a/nfs-utils.spec b/nfs-utils.spec
index f362fbd..7b7c9f1 100644
--- a/nfs-utils.spec
+++ b/nfs-utils.spec
@@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser
 Name: nfs-utils
 URL: http://sourceforge.net/projects/nfs
 Version: 1.3.1
-Release: 1.0%{?dist}
+Release: 1.1%{?dist}
 Epoch: 1
 
 # group all 32bit related archs
@@ -283,6 +283,9 @@ fi
 /sbin/umount.nfs4
 
 %changelog
+* Fri Oct 24 2014 Steve Dickson <steved at redhat.com> 1.3.1-1.1
+- Added fix to umount in the nfs-utils-1.3.2-rc1.patch
+
 * Wed Oct 22 2014 Steve Dickson <steved at redhat.com> 1.3.1-1.0
 - Updated to latest upstream RC release: nfs-utils-1-3-2-rc1 (bz 1142842)
 


More information about the scm-commits mailing list