Re: [PATCH] Fix '\%o' for printf from coreutils

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

 



On Thu, Oct 31, 2013 at 12:51:32PM +0100, Kacper Kornet wrote:

> The printf utility provided by coreutils when interpreting '\%o' format
> does not recognize %o as formatting directive. For example
> printf '\%o 0 returns \%o and warning: ignoring excess arguments,
> starting with ‘0’, which results in failed tests in
> t5309-pack-delta-cycles.sh. In most shells the test ends with success as
> the printf is a builtin utility.
> 
> Fix it by using '\\%o' which is interpreted consistently in all versions
> of printf.

Thanks, this makes sense. POSIX says:

     [description of \n, \r, etc...]
     The interpretation of a backslash followed by any other
     sequence of characters is unspecified.

so we were wrong to rely on an unknown backslash-escape
being left alone. A quick grep seems indicate that this is
the only spot with the problem.

-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]