exportfs: add the debug option
Subsystems (2)
PATCH 1/1 exportfs: add the debug option
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 <[email protected]>
--- utils/exportfs/exportfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
utils/exportfs/exportfs.c +4 -1
@@ -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 ;
Signature · 1 line
2.4.11
Quoted 16 lines · Scott Mayhew
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 <[email protected]>--- utils/exportfs/exportfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)utils/exportfs/exportfs.c +0
-0@@ -108,11 +108,14 @@ main(int argc, char **argv)xlog_stderr (1 );xlog_syslog (0 );
utils/exportfs/exportfs.c main(int argc, char **argv) · line 118
Quoted 10 lines
utils/exportfs/exportfs.c +4
-1-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.
Quoted 4 lines
utils/exportfs/exportfs.c +0
-0case 'f' : force_flush =1 ;break ;