Subject: Re: snprintf returns?
To: Jonathan Stone <jonathan@dsg.stanford.edu>
From: Johan Danielsson <joda@pdc.kth.se>
List: tech-kern
Date: 04/29/2004 08:26:06
Jonathan Stone <jonathan@dsg.stanford.edu> writes:
> Kernel programming and userland programming *are*
> different. Attempts to hide those differences can do more harm than
> good, by creating a false sense of security and familiarity.
A good argument why two functions with the same name and the same
signature should not do two different things in and out of kernel.
> That said: I keep thinking, maybe we should design a truly safe
> interface for the kernel uses mentioned so far; maybe call that new
> function "slprintf()" (following strlcpy/strlcat), and be done with it.
I suppose what we want then is snprintf_cat (but with a better name).
I've always wanted an appending snprintf.
/Johan