Blame SOURCES/nfs-utils-1.3.0-libmount-umount-verbose.patch

4f2874
diff -up nfs-utils-1.3.0/utils/mount/mount_libmount.c.orig nfs-utils-1.3.0/utils/mount/mount_libmount.c
4f2874
--- nfs-utils-1.3.0/utils/mount/mount_libmount.c.orig	2014-03-25 11:12:07.000000000 -0400
4f2874
+++ nfs-utils-1.3.0/utils/mount/mount_libmount.c	2014-10-24 09:46:11.158190704 -0400
4f2874
@@ -173,7 +173,7 @@ static int umount_main(struct libmnt_con
4f2874
 {
4f2874
 	int rc, c;
4f2874
 	char *spec = NULL, *opts = NULL;
4f2874
-	int ret = EX_FAIL;
4f2874
+	int ret = EX_FAIL, verbose = 0;
4f2874
 
4f2874
 	static const struct option longopts[] = {
4f2874
 		{ "force", 0, 0, 'f' },
4f2874
@@ -200,6 +200,8 @@ static int umount_main(struct libmnt_con
4f2874
 		return EX_USAGE;
4f2874
 	}
4f2874
 
4f2874
+	verbose = mnt_context_is_verbose(cxt);
4f2874
+
4f2874
 	if (optind < argc)
4f2874
 		spec = argv[optind++];
4f2874
 
4f2874
@@ -227,6 +229,10 @@ static int umount_main(struct libmnt_con
4f2874
 		goto err;
4f2874
 	}
4f2874
 
4f2874
+	if (verbose)
4f2874
+		printf(_("%s: %s mount point detected\n"), spec,
4f2874
+					mnt_context_get_fstype(cxt));
4f2874
+
4f2874
 	opts = retrieve_mount_options(mnt_context_get_fs(cxt));
4f2874
 
4f2874
 	if (!mnt_context_is_lazy(cxt)) {
4f2874
@@ -262,6 +268,12 @@ static int umount_main(struct libmnt_con
4f2874
 	}
4f2874
 	ret = EX_SUCCESS;
4f2874
 err:
4f2874
+	if (verbose) {
4f2874
+		if (ret == EX_SUCCESS)
4f2874
+			printf(_("%s: umounted\n"), spec);
4f2874
+		else
4f2874
+			printf(_("%s: umount failed\n"), spec);
4f2874
+	}
4f2874
 	free(opts);
4f2874
 	return ret;
4f2874
 }