Subject: kernel printf() return type
To: None <tech-kern@netbsd.org>
From: Frank van der Linden <fvdl@wasabisystems.com>
List: tech-kern
Date: 12/09/2002 00:45:00
Is there any reason that the kernel version of printf has return type
void? The return value (number of characters printed) is readily
available from kprintf() (the internal version). Changing it to
return an int would also make it have matching semantics with
userspace, and with FreeBSD, amongst others.

Originally, the kernel printf was indeed void, but we've had an
int-returning kprintf since subr_prf.c rev 1.45:

date: 1997/10/24 18:14:25;  author: chuck;  state: Exp;  lines: +841 -467
import chris torek's vfprintf() from libc [renamed to kprintf and all
floating point stuff removed].

If noone objects, I'll make the trivial change in a couple of days.

- Frank

-- 
Frank van der Linden                                    fvdl@wasabisystems.com
==============================================================================
Quality NetBSD Development, Support & Service.   http://www.wasabisystems.com/