aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cdrom/sbpcd.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2006-12-06 23:37:06 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 11:39:35 -0500
commit5ac29e62be2a581ec77953eca64d85ddeef488f0 (patch)
tree94f7c65ce77f5a0dc6703707fd23283793610028 /drivers/cdrom/sbpcd.c
parent18debbbcce1306f0bbb1c71cf587fd90413acab6 (diff)
[PATCH] drivers/cdrom/*: trivial vsnprintf() conversion
Fixing sbpcd.c baroque error printing in process. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Jens Axboe <axboe@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/cdrom/sbpcd.c')
-rw-r--r--drivers/cdrom/sbpcd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/cdrom/sbpcd.c b/drivers/cdrom/sbpcd.c
index ba50e5a712f2..a1283b1ef989 100644
--- a/drivers/cdrom/sbpcd.c
+++ b/drivers/cdrom/sbpcd.c
@@ -770,11 +770,10 @@ static void msg(int level, const char *fmt, ...)
770 770
771 msgnum++; 771 msgnum++;
772 if (msgnum>99) msgnum=0; 772 if (msgnum>99) msgnum=0;
773 sprintf(buf, MSG_LEVEL "%s-%d [%02d]: ", major_name, current_drive - D_S, msgnum);
774 va_start(args, fmt); 773 va_start(args, fmt);
775 vsprintf(&buf[18], fmt, args); 774 vsnprintf(buf, sizeof(buf), fmt, args);
776 va_end(args); 775 va_end(args);
777 printk(buf); 776 printk(MSG_LEVEL "%s-%d [%02d]: %s", major_name, current_drive - D_S, msgnum, buf);
778#if KLOGD_PAUSE 777#if KLOGD_PAUSE
779 sbp_sleep(KLOGD_PAUSE); /* else messages get lost */ 778 sbp_sleep(KLOGD_PAUSE); /* else messages get lost */
780#endif /* KLOGD_PAUSE */ 779#endif /* KLOGD_PAUSE */