Re: [PATCH v2 1/3] Introduce die_errno() that appends strerror(errno) to die()

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

 



On Mon, Jun 08, 2009 at 07:35:55PM +0400, Alexander Potashev wrote:

> > More than that, you must support arbitrary printf format strings,
> > because the die routine is passed whatever goes to die() (a quick grep
> > revealed that we use at least %u and %c at various points). So it is an
> > undocumented requirement that the die routine process its parameters as
> > if it were from the printf family.
> 
> Your last statement is not quite true. A custom die routine may
> support all printf specifiers and some additional ones, but Thomas'
> die_errno passes the format string (and arguments list) to vsnprintf
> anyway, so the additional specifiers would be lost.

But if die() is called (_not_ die_errno), then the format is passed
unchanged. So what I am saying is that anyone supplying a die_routine
_already_ has to handle all printf format specifiers. So asking them to
handle just "%s" via die_errno is not introducing any additional
requirements.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]