From: Kees van Reeuwijk Date: Thu, 1 Apr 2010 14:30:36 +0000 (+0000) Subject: Fixed some incorrect uses of printf-like functions. X-Git-Tag: v3.1.7~182 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/man.host.html?a=commitdiff_plain;h=0a04f49d2ba686ce7ebc5c1200a2061bd849cc08;p=minix.git Fixed some incorrect uses of printf-like functions. --- diff --git a/drivers/at_wini/at_wini.c b/drivers/at_wini/at_wini.c index 5c4195cde..734bfa645 100644 --- a/drivers/at_wini/at_wini.c +++ b/drivers/at_wini/at_wini.c @@ -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"); } diff --git a/drivers/audio/common/audio_fw.c b/drivers/audio/common/audio_fw.c index c5daec183..ba2ee458a 100644 --- a/drivers/audio/common/audio_fw.c +++ b/drivers/audio/common/audio_fw.c @@ -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; } } diff --git a/kernel/arch/i386/breakpoints.c b/kernel/arch/i386/breakpoints.c index 6cffe8ed6..eaf54ee5c 100644 --- a/kernel/arch/i386/breakpoints.c +++ b/kernel/arch/i386/breakpoints.c @@ -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); diff --git a/lib/libsys/sef_signal.c b/lib/libsys/sef_signal.c index 76a23d907..c7c78c156 100644 --- a/lib/libsys/sef_signal.c +++ b/lib/libsys/sef_signal.c @@ -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); } } }