diff mbox

[nfs-utils] exportfs: add the debug option

Message ID 1461936356-26727-1-git-send-email-smayhew@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Scott Mayhew April 29, 2016, 1:25 p.m. UTC
Since calling xlog(D_GENERAL) will cause exportfs to exit with a status
of 1, there really should be a way to see those messages for debugging
purposes.

Signed-off-by: Scott Mayhew <smayhew@redhat.com>
---
 utils/exportfs/exportfs.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Steve Dickson April 29, 2016, 3:09 p.m. UTC | #1
On 04/29/2016 09:25 AM, Scott Mayhew wrote:
> Since calling xlog(D_GENERAL) will cause exportfs to exit with a status
> of 1, there really should be a way to see those messages for debugging
> purposes.
> 
> Signed-off-by: Scott Mayhew <smayhew@redhat.com>
> ---
>  utils/exportfs/exportfs.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c
> index a9151ff..a5eb156 100644
> --- a/utils/exportfs/exportfs.c
> +++ b/utils/exportfs/exportfs.c
> @@ -108,11 +108,14 @@ main(int argc, char **argv)
>  	xlog_stderr(1);
>  	xlog_syslog(0);
>  
> -	while ((c = getopt(argc, argv, "afhio:ruvs")) != EOF) {
> +	while ((c = getopt(argc, argv, "ad:fhio:ruvs")) != EOF) {
>  		switch(c) {
>  		case 'a':
>  			f_all = 1;
>  			break;
> +		case 'd':
> +			xlog_sconfig(optarg, 1);
> +			break;
I'm all for doing this but there needs to be an
usage() update and man page update. For the man
page update, just rip the verbiage out of the
mountd man page since they are the same.

steved.
 
>  		case 'f':
>  			force_flush = 1;
>  			break;
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c
index a9151ff..a5eb156 100644
--- a/utils/exportfs/exportfs.c
+++ b/utils/exportfs/exportfs.c
@@ -108,11 +108,14 @@  main(int argc, char **argv)
 	xlog_stderr(1);
 	xlog_syslog(0);
 
-	while ((c = getopt(argc, argv, "afhio:ruvs")) != EOF) {
+	while ((c = getopt(argc, argv, "ad:fhio:ruvs")) != EOF) {
 		switch(c) {
 		case 'a':
 			f_all = 1;
 			break;
+		case 'd':
+			xlog_sconfig(optarg, 1);
+			break;
 		case 'f':
 			force_flush = 1;
 			break;