Re: [PATCH v2 04/10] lib/vsprintf: add %*pE[achnops] format specifier

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

 



On Mon, 2014-07-07 at 18:21 +0300, Andy Shevchenko wrote:

> diff --git a/lib/vsprintf.c b/lib/vsprintf.c
[]
>  static noinline_for_stack
> +char *escaped_string(char *buf, char *end, u8 *addr, struct printf_spec spec,
> +		     const char *fmt)
[]
> +	if (spec.field_width == 0)
> +		/* nothing to print */
> +		return buf;
[]
> +	len = spec.field_width < 0 ? 1 : spec.field_width;

If field_width is not specified, emit a single byte?

Perhaps better if -1 was accepted by string_escape_mem
as a strlen request or just ignored as a 0 length is
above.

fyi: hex_string emits nothing on printk("%ph", buf);


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux