Re: [PATCH v2] workqueue.c: Increase workqueue name length

From: Rasmus Villemoes
Date: Wed Jan 10 2024 - 17:58:26 EST


On 10/01/2024 23.45, Rafael Aquini wrote:
> On Wed, Jan 10, 2024 at 05:31:49PM -0500, Rafael Aquini wrote:

>> this snippet from PRINTF(3) man page
>>
>> RETURN VALUE
>> Upon successful return, these functions return the number of characters
>> printed (excluding the null byte used to end output to strings).
>>
>
> Perhaps the man page should be amended to indicate vsnprintf returns the
> number of characters that would have been printed if the buffer size
> were unlimited.
>
> We based the assumption of kernel's vsnprintf behavior out of the
> documented POSIX behavior as stated on the man page.

That's not at all the "documented POSIX behaviour". There's also no
reason to take that from badly (re)worded man pages when the horse's
mouth is right here:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/snprintf.html
(and for vsnprintf,
https://pubs.opengroup.org/onlinepubs/9699919799/functions/vfprintf.html
, but that explicitly says it's the same as snprintf except for how the
varargs are passed).

Rasmus