aboutsummaryrefslogtreecommitdiff
path: root/sys/ddb/db_output.c
diff options
context:
space:
mode:
authorAttilio Rao <attilio@FreeBSD.org>2010-05-11 17:01:14 +0000
committerAttilio Rao <attilio@FreeBSD.org>2010-05-11 17:01:14 +0000
commit3caaaae046e53af784ed931c26526165aec0a726 (patch)
treeb27d5ec4ed70f3633f0abcab31f2d96e2440f5f6 /sys/ddb/db_output.c
parentde6648745ce9b6ac9100f8a27f6d6d2130b4ee61 (diff)
downloadsrc-3caaaae046e53af784ed931c26526165aec0a726.tar.gz
src-3caaaae046e53af784ed931c26526165aec0a726.zip
There is not a good reason to have a different prototype for db_printf()
when compared to printf(). Unify it by returning the number of characters displayed for db_printf() as well. MFC after: 7 days
Notes
Notes: svn path=/head/; revision=207922
Diffstat (limited to 'sys/ddb/db_output.c')
-rw-r--r--sys/ddb/db_output.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/ddb/db_output.c b/sys/ddb/db_output.c
index 4f646c9ceef9..8390a865d5d5 100644
--- a/sys/ddb/db_output.c
+++ b/sys/ddb/db_output.c
@@ -316,7 +316,7 @@ db_print_position()
/*
* Printing
*/
-void
+int
db_printf(const char *fmt, ...)
{
#ifdef DDB_BUFR_SIZE
@@ -324,6 +324,7 @@ db_printf(const char *fmt, ...)
#endif
struct dbputchar_arg dca;
va_list listp;
+ int retval;
#ifdef DDB_BUFR_SIZE
dca.da_pbufr = bufr;
@@ -336,13 +337,14 @@ db_printf(const char *fmt, ...)
#endif
va_start(listp, fmt);
- kvprintf (fmt, db_putchar, &dca, db_radix, listp);
+ retval = kvprintf (fmt, db_putchar, &dca, db_radix, listp);
va_end(listp);
#ifdef DDB_BUFR_SIZE
if (*dca.da_pbufr != '\0')
db_puts(dca.da_pbufr);
#endif
+ return (retval);
}
int db_indent;