tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bus_space(9) types and printf()

> Or add a MD function to convert a bus_space_tag_t to a value that can
> be printed with (say) %p in MI code that includes most of the useful
> info.

I've felt, in recent years, that printf is annoyingly weak in some
respects.  For these purposes, it would be really nice to have a format
specifier that does callbacks, perhaps something like

void print_thing(FILE *, void *);
printf("...%~...",...,&print_thing,(void *)thing,...)

Or perhaps void print_thing(void (*)(const char *, ...), void *) (whose
first arg is printf-signature).

Perhaps kernel printf should grow such a thing?

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML      
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

Home | Main Index | Thread Index | Old Index