diff options
author | Steve Dickson <steved@redhat.com> | 2013-10-28 08:45:19 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2013-10-28 14:28:40 -0400 |
commit | da88f28656da305ed319867211753baac32c4242 (patch) | |
tree | f07daa64ff30afecc801842190cced657c40573d /utils/exportfs/exportfs.c | |
parent | 74de1431adebb7780a2c4b9c122050e2fb7608b8 (diff) | |
download | nfs-utils-da88f28656da305ed319867211753baac32c4242.tar.gz nfs-utils-da88f28656da305ed319867211753baac32c4242.tar.xz nfs-utils-da88f28656da305ed319867211753baac32c4242.zip |
exportfs: report failure if asked to unexport something not exported.
Currently if exportfs is asked to unexport something that is not
exported it silently succeeds. This is not ideal, particularly for
scripting situations.
So report an error when the unexport was successful and the -v flag used.
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/exportfs/exportfs.c')
-rw-r--r-- | utils/exportfs/exportfs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c index 318deb3..6962444 100644 --- a/utils/exportfs/exportfs.c +++ b/utils/exportfs/exportfs.c @@ -413,6 +413,8 @@ unexportfs(char *arg, int verbose) exp->m_mayexport = 0; rc = 1; } + if (!rc && verbose) + xlog(L_ERROR, "Could not find '%s:%s' to unexport.", arg, path); freeaddrinfo(ai); return rc; |