From da88f28656da305ed319867211753baac32c4242 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Mon, 28 Oct 2013 08:45:19 -0400 Subject: 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 --- utils/exportfs/exportfs.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'utils/exportfs/exportfs.c') 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; -- cgit