]> Zhao Yanbai Git Server - minix.git/commitdiff
Fixed some incorrect uses of printf-like functions.
authorKees van Reeuwijk <reeuwijk@few.vu.nl>
Thu, 1 Apr 2010 14:30:36 +0000 (14:30 +0000)
committerKees van Reeuwijk <reeuwijk@few.vu.nl>
Thu, 1 Apr 2010 14:30:36 +0000 (14:30 +0000)
drivers/at_wini/at_wini.c
drivers/audio/common/audio_fw.c
kernel/arch/i386/breakpoints.c
lib/libsys/sef_signal.c

index 5c4195cdec11bac7b4c330cd8e0c3d3467f922d1..734bfa6453facd8746c3c5f8a98e0ec5a1e5944c 100644 (file)
@@ -2556,7 +2556,7 @@ PRIVATE int at_in(int line, u32_t port, u32_t *value,
        if(s == OK)
                return OK;
        printf("at_wini%d: line %d: %s failed: %d; port %x\n", 
-               w_instance, line, typename, s, value, port);
+               w_instance, line, typename, s, port);
         panic("sys_in failed");
 }
 
index c5daec183523fcb18150c67e0c65c35443f6a56d..ba2ee458ad70ec33535f92e210c5b9eb887778d7 100644 (file)
@@ -245,7 +245,7 @@ PRIVATE int init_driver(void) {
 
        /* ...and register interrupt vector */
        if ((i=sys_irqsetpolicy(irq, 0, &irq_hook_id )) != OK){
-               error("%s: init driver couldn't set IRQ policy", drv.DriverName, i);
+               error("%s: init driver couldn't set IRQ policy: %d", drv.DriverName, i);
                return EIO;
        }
        irq_hook_set = TRUE; /* now signal handler knows it must unregister policy*/
@@ -297,19 +297,19 @@ PRIVATE int msg_open (int minor_dev_nr) {
        io_ctl = special_file_ptr->io_ctl;
 
        if (read_chan==NO_CHANNEL && write_chan==NO_CHANNEL && io_ctl==NO_CHANNEL) {
-               error("%s: No channel specified for minor device!\n", 
+               error("%s: No channel specified for minor device %d!\n", 
                                drv.DriverName, minor_dev_nr);
                return EIO;
        }
        if (read_chan == write_chan && read_chan != NO_CHANNEL) {
-               error("%s: Read and write channels are equal!\n", 
+               error("%s: Read and write channels are equal: %d!\n", 
                                drv.DriverName, minor_dev_nr);
                return EIO;
        }
        /* init driver */
        if (!device_available) {  
                if (init_driver() != OK) {
-                       error("%s: Couldn't init driver!\n", drv.DriverName, minor_dev_nr);
+                       error("%s: Couldn't init driver!\n", drv.DriverName);
                        return EIO;
                } else {
                        device_available = TRUE;
@@ -515,7 +515,7 @@ PRIVATE void msg_write(const message *m_ptr)
 
        if (!sub_dev_ptr->DmaBusy) { /* get fragment size on first write */
                if (drv_get_frag_size(&(sub_dev_ptr->FragSize), sub_dev_ptr->Nr) != OK){
-                       error("%s; Failed to get fragment size!\n", drv.DriverName, 0);
+                       error("%s; Failed to get fragment size!\n", drv.DriverName);
                        return; 
                }
        }
index 6cffe8ed6cb77806005d02813759e928aa14fa8c..eaf54ee5c826a26acb31c353dbf6caa42cde6eaf 100644 (file)
@@ -47,7 +47,7 @@ printf("ld_dr7(0x%x)\n",dr7);
                case 1: ld_dr1(linaddr); break;
                case 2: ld_dr2(linaddr); break;
                case 3: ld_dr3(linaddr); break;
-               default: panic(__FILE__, "invalid breakpoint index", __LINE__);
+               default: panic("%s:%d: invalid breakpoint index", __FILE__,  __LINE__);
        }
 printf("ld_dr%d(0x%x)\n",bp,linaddr);
        
index 76a23d90792d05c3155eedb860bfd6d5089ff6f2..c7c78c1561ed9c9850baaaa62e5620540e32fc77 100644 (file)
@@ -34,7 +34,7 @@ PRIVATE void process_sigmgr_signals(void)
   while (TRUE) {
       /* Get an arbitrary pending signal. */
       if((r=sys_getksig(&target, &sigset)) != OK)
-          panic("SEF", "sys_getksig failed", r);
+          panic("SEF: sys_getksig failed: %d", r);
 
       if (target == NONE) {
           /* Stop if there are no more pending signals. */
@@ -56,7 +56,7 @@ PRIVATE void process_sigmgr_signals(void)
           /* Tell the kernel we are done if the target is still alive. */
           if(r == OK) {
               if((r=sys_endksig(target)) != OK)
-                  panic("SEF","sys_endksig failed", r);
+                  panic("SEF: sys_endksig failed :%d", r);
           }
       }
   }