[K42-discussion] patch to silence debug output in mknod()

Maria Butrico butrico at us.ibm.com
Tue Apr 11 02:21:22 EST 2006


Andrew, let me simply turn off verbose.  We needed as a debug aid at one
point, and I prefer to leave the code there, but it is not really needed
for anything else.

Maria Butrico    <internet or sametime: butrico at us.ibm.com;     Notes:
Maria Butrico/Watson/IBM>



                                                                           
             Andrew Baumann                                                
             <andrewb at cse.unsw                                             
             .edu.au>                                                   To 
             Sent by:                  k42-discussion at ozlabs.org           
             k42-discussion-bo                                          cc 
             unces+butrico=us.                                             
             ibm.com at ozlabs.or                                     Subject 
             g                         [K42-discussion] patch to silence   
                                       debug output in mknod()             
                                                                           
             04/08/2006 02:40                                              
             AM                                                            
                                                                           
                                                                           
                                                                           




Hi,

this patch silences some debug output from mknod() when the RUN_SILENT flag
is
set. Is the output still required? If not, I would be tempted to just turn
off the VERBOSE_MKNOD define.

Signed-off-by: Andrew Baumann <andrewb at cse.unsw.edu.au>

Cheers,
Andrew


--- kitch-linux/lib/emu/mknod.C 6 May 2005 15:28:07 -0000       1.13
+++ kitch-linux/lib/emu/mknod.C 8 Apr 2006 05:16:52 -0000
@@ -26,18 +26,22 @@
 {
     SysStatus rc;

-    #define VERBOSE_MKNOD
-    #ifdef VERBOSE_MKNOD
-    err_printf("%s: pathname %s  mode=0x%lx  dev=0x%lx\n",
-       __PRETTY_FUNCTION__,
-       pathname, mode, dev);
-    #endif     // VERBOSE_MKNOD
+#define VERBOSE_MKNOD
+#ifdef VERBOSE_MKNOD
+    if (!KernelInfo::ControlFlagIsSet(KernelInfo::RUN_SILENT)) {
+       err_printf("%s: pathname %s  mode=0x%lx  dev=0x%lx\n",
+           __PRETTY_FUNCTION__,
+           pathname, mode, dev);
+    }
+#endif // VERBOSE_MKNOD

     rc = FileLinux::Mknod(pathname, mode, dev);
     if (_FAILURE(rc)) {
-        #ifdef VERBOSE_MKNOD
-       _SERROR_EPRINT(rc);
-        #endif // VERBOSE_MKNOD
+#ifdef VERBOSE_MKNOD
+       if (!KernelInfo::ControlFlagIsSet(KernelInfo::RUN_SILENT)) {
+           _SERROR_EPRINT(rc);
+       }
+#endif // VERBOSE_MKNOD
        return -_SGENCD(rc);
     }
     return 0;
(See attached file: att4tksd.dat)
_______________________________________________
K42-discussion mailing list
K42-discussion at ozlabs.org
https://ozlabs.org/mailman/listinfo/k42-discussion
-------------- next part --------------
A non-text attachment was scrubbed...
Name: att4tksd.dat
Type: application/octet-stream
Size: 196 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/k42-discussion/attachments/20060410/9d28d455/attachment.obj 


More information about the K42-discussion mailing list