]> git.sur5r.net Git - openldap/commitdiff
add '-Q' switch (used by slaptest only; ITS#4930)
authorPierangelo Masarati <ando@openldap.org>
Tue, 14 Aug 2007 13:42:40 +0000 (13:42 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 14 Aug 2007 13:42:40 +0000 (13:42 +0000)
servers/slapd/slapcommon.c
servers/slapd/slapcommon.h
servers/slapd/slaptest.c

index 188d4c73e5c6e1064a6ef200937443a21febe6a1..0ce9fc9e3b657e29de8cf2aaa8d0e749ff99ea22 100644 (file)
@@ -255,7 +255,7 @@ slap_tool_init(
                break;
 
        case SLAPTEST:
-               options = "d:f:F:o:uv";
+               options = "d:f:F:o:Quv";
                mode |= SLAP_TOOL_READMAIN | SLAP_TOOL_READONLY;
                break;
 
@@ -371,6 +371,11 @@ slap_tool_init(
                        dn_mode = SLAP_TOOL_LDAPDN_PRETTY;
                        break;
 
+               case 'Q':
+                       quiet++;
+                       slap_debug = 0;
+                       break;
+
                case 'q':       /* turn on quick */
                        mode |= SLAP_TOOL_QUICK;
                        break;
index 8f74a029e9df5f8b680f866dc206c705d2287112..0fc4f09e1554cc22c2e5f0a2015f4e7f38262763 100644 (file)
@@ -35,6 +35,7 @@ enum slaptool {
 typedef struct tool_vars {
        Backend *tv_be;
        int tv_verbose;
+       int tv_quiet;
        int tv_update_ctxcsn;
        int tv_continuemode;
        int tv_nosubordinates;
@@ -65,6 +66,7 @@ extern tool_vars tool_globals;
 
 #define        be tool_globals.tv_be
 #define verbose tool_globals.tv_verbose
+#define quiet tool_globals.tv_quiet
 #define jumpline tool_globals.tv_jumpline
 #define update_ctxcsn tool_globals.tv_update_ctxcsn
 #define continuemode tool_globals.tv_continuemode
index ca10c7a6c7e2543192b227d47926f20158c13b87..84f87caeb5ca04cbc63565449bc9d36d768e3a20 100644 (file)
@@ -104,7 +104,9 @@ slaptest( int argc, char **argv )
                }
        }
 
-       fprintf( stderr, "config file testing succeeded\n");
+       if ( !quiet ) {
+               fprintf( stderr, "config file testing succeeded\n");
+       }
 
        slap_tool_destroy();