poldek: poldek/cli/cli.c, poldek/cli/shell.c - fixed verbosity (#139) (fix ...

mis mis at pld-linux.org
Thu May 8 22:24:47 CEST 2008


Author: mis                          Date: Thu May  8 20:24:47 2008 GMT
Module: poldek                        Tag: HEAD
---- Log message:
- fixed verbosity (#139) (fix by megabajt)

---- Files affected:
poldek/poldek/cli:
   cli.c (1.44 -> 1.45) , shell.c (1.34 -> 1.35) 

---- Diffs:

================================================================
Index: poldek/poldek/cli/cli.c
diff -u poldek/poldek/cli/cli.c:1.44 poldek/poldek/cli/cli.c:1.45
--- poldek/poldek/cli/cli.c:1.44	Sun Feb  3 19:01:59 2008
+++ poldek/poldek/cli/cli.c	Thu May  8 22:24:42 2008
@@ -731,9 +731,12 @@
                          const char *cmdline, struct cmd_pipe *cmd_pipe) 
 {
     tn_array              *cmd_chain;
-    int                   rc = 0, i;
+    int                   rc = 0, i, verbose;
 
     DBGF("%s\n", cmdline);
+
+    /* keep verbose setting as it changes when '-q' option is used */
+    verbose = poldek_verbose();
     
     cmd_chain = poclidek_prepare_cmdline(cctx, cmdline);
     if (cmd_chain == NULL)
@@ -753,7 +756,10 @@
         else
             rc = poclidek_exec_cmd_ent(cctx, ts, ent, NULL);
     }
-    
+
+    /* restore verbose setting */
+    poldek_set_verbose(verbose);
+
     n_array_free(cmd_chain);
     return rc;
 }

================================================================
Index: poldek/poldek/cli/shell.c
diff -u poldek/poldek/cli/shell.c:1.34 poldek/poldek/cli/shell.c:1.35
--- poldek/poldek/cli/shell.c:1.34	Sun Feb  3 19:01:59 2008
+++ poldek/poldek/cli/shell.c	Thu May  8 22:24:42 2008
@@ -405,8 +405,6 @@
                 
         s = n_str_strip_ws(line);
         if (*s) {
-            int _verbose = poldek_verbose();
-            
             shInCmd = 1;
             DBGF("(%s)\n", s);
 
@@ -417,8 +415,6 @@
             sigint_reset();
             shDone = 0;
             shInCmd = 0;
-
-            poldek_set_verbose(_verbose);
         }
         free(line);
         
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/poldek/poldek/cli/cli.c?r1=1.44&r2=1.45&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/poldek/poldek/cli/shell.c?r1=1.34&r2=1.35&f=u



More information about the pld-cvs-commit mailing list