Re: [kvm-unit-tests PATCH v5 06/18] lib: add vprintf

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

 



On 17.02.2016 19:40, Andrew Jones wrote:
> va_report_xfail has the pattern
> 
>  char buf[]
>  vsnprintf(buf, ...)
>  puts(buf)
> 
> Before adding another one, replace it with vprintf.
> 
> Suggested-by: David Gibson <david@xxxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Andrew Jones <drjones@xxxxxxxxxx>
> ---
>  lib/libcflat.h |  1 +
>  lib/printf.c   | 14 +++++++++++++-
>  lib/report.c   |  4 +---
>  3 files changed, 15 insertions(+), 4 deletions(-)
> 
> diff --git a/lib/libcflat.h b/lib/libcflat.h
> index 9747ccdbc9f1d..f7a5728c6759a 100644
> --- a/lib/libcflat.h
> +++ b/lib/libcflat.h
> @@ -55,6 +55,7 @@ extern void abort(void);
>  extern int printf(const char *fmt, ...);
>  extern int snprintf(char *buf, int size, const char *fmt, ...);

Completely off-topic to your patch, but these declarations above could
maybe be improved with __attribute__((format (printf, x, y))) to get
some nice format string checks from the compiler.

>  extern int vsnprintf(char *buf, int size, const char *fmt, va_list va);
> +extern int vprintf(const char *fmt, va_list va);
>  extern long atol(const char *ptr);

Back to the topic: Your patch looks fine to me, so:

Reviewed-by: Thomas Huth <thuth@xxxxxxxxxx>

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



[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux