mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
This commit is contained in:
parent
de6648745c
commit
3caaaae046
3 changed files with 11 additions and 9 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ int db_md_clr_watchpoint(db_expr_t addr, db_expr_t size);
|
|||
void db_md_list_watchpoints(void);
|
||||
void db_print_loc_and_inst(db_addr_t loc);
|
||||
void db_print_thread(void);
|
||||
void db_printf(const char *fmt, ...) __printflike(1, 2);
|
||||
int db_printf(const char *fmt, ...) __printflike(1, 2);
|
||||
int db_read_bytes(vm_offset_t addr, size_t size, char *data);
|
||||
/* machine-dependent */
|
||||
int db_readline(char *lstart, int lsize);
|
||||
|
|
|
|||
|
|
@ -343,10 +343,10 @@ static int sysctl_debug_witness_fullgraph(SYSCTL_HANDLER_ARGS);
|
|||
static void witness_add_fullgraph(struct sbuf *sb, struct witness *parent);
|
||||
#ifdef DDB
|
||||
static void witness_ddb_compute_levels(void);
|
||||
static void witness_ddb_display(void(*)(const char *fmt, ...));
|
||||
static void witness_ddb_display_descendants(void(*)(const char *fmt, ...),
|
||||
static void witness_ddb_display(int(*)(const char *fmt, ...));
|
||||
static void witness_ddb_display_descendants(int(*)(const char *fmt, ...),
|
||||
struct witness *, int indent);
|
||||
static void witness_ddb_display_list(void(*prnt)(const char *fmt, ...),
|
||||
static void witness_ddb_display_list(int(*prnt)(const char *fmt, ...),
|
||||
struct witness_list *list);
|
||||
static void witness_ddb_level_descendants(struct witness *parent, int l);
|
||||
static void witness_ddb_list(struct thread *td);
|
||||
|
|
@ -908,7 +908,7 @@ witness_ddb_level_descendants(struct witness *w, int l)
|
|||
}
|
||||
|
||||
static void
|
||||
witness_ddb_display_descendants(void(*prnt)(const char *fmt, ...),
|
||||
witness_ddb_display_descendants(int(*prnt)(const char *fmt, ...),
|
||||
struct witness *w, int indent)
|
||||
{
|
||||
int i;
|
||||
|
|
@ -938,7 +938,7 @@ witness_ddb_display_descendants(void(*prnt)(const char *fmt, ...),
|
|||
}
|
||||
|
||||
static void
|
||||
witness_ddb_display_list(void(*prnt)(const char *fmt, ...),
|
||||
witness_ddb_display_list(int(*prnt)(const char *fmt, ...),
|
||||
struct witness_list *list)
|
||||
{
|
||||
struct witness *w;
|
||||
|
|
@ -953,7 +953,7 @@ witness_ddb_display_list(void(*prnt)(const char *fmt, ...),
|
|||
}
|
||||
|
||||
static void
|
||||
witness_ddb_display(void(*prnt)(const char *fmt, ...))
|
||||
witness_ddb_display(int(*prnt)(const char *fmt, ...))
|
||||
{
|
||||
struct witness *w;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue