You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

45 lines
1.2 KiB

diff -up nfs-utils-1.3.0/utils/mount/mount_libmount.c.orig nfs-utils-1.3.0/utils/mount/mount_libmount.c
--- nfs-utils-1.3.0/utils/mount/mount_libmount.c.orig 2014-03-25 11:12:07.000000000 -0400
+++ nfs-utils-1.3.0/utils/mount/mount_libmount.c 2014-10-24 09:46:11.158190704 -0400
@@ -173,7 +173,7 @@ static int umount_main(struct libmnt_con
{
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' },
@@ -200,6 +200,8 @@ static int umount_main(struct libmnt_con
return EX_USAGE;
}
+ verbose = mnt_context_is_verbose(cxt);
+
if (optind < argc)
spec = argv[optind++];
@@ -227,6 +229,10 @@ static int umount_main(struct libmnt_con
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)) {
@@ -262,6 +268,12 @@ static int umount_main(struct libmnt_con
}
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;
}