mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
tools: Adopt __printf from kernel sources
To have a more compact way to ask the compiler to perform printf like vargargs validation. v2: Fixed up build on arm, squashing a patch by Kim Phillips, thanks! Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kim Phillips <kim.phillips@arm.com> Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-dopkqmmuqs04cxzql0024nnu@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
6c3466435b
commit
afaed6d3e4
8 changed files with 21 additions and 23 deletions
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <linux/compiler.h>
|
||||
#include "event.h"
|
||||
#include "../ui/helpline.h"
|
||||
#include "../ui/progress.h"
|
||||
|
@ -40,16 +41,16 @@ extern int debug_data_convert;
|
|||
|
||||
#define STRERR_BUFSIZE 128 /* For the buffer size of str_error_r */
|
||||
|
||||
int dump_printf(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
|
||||
int dump_printf(const char *fmt, ...) __printf(1, 2);
|
||||
void trace_event(union perf_event *event);
|
||||
|
||||
int ui__error(const char *format, ...) __attribute__((format(printf, 1, 2)));
|
||||
int ui__warning(const char *format, ...) __attribute__((format(printf, 1, 2)));
|
||||
int ui__error(const char *format, ...) __printf(1, 2);
|
||||
int ui__warning(const char *format, ...) __printf(1, 2);
|
||||
|
||||
void pr_stat(const char *fmt, ...);
|
||||
|
||||
int eprintf(int level, int var, const char *fmt, ...) __attribute__((format(printf, 3, 4)));
|
||||
int eprintf_time(int level, int var, u64 t, const char *fmt, ...) __attribute__((format(printf, 4, 5)));
|
||||
int eprintf(int level, int var, const char *fmt, ...) __printf(3, 4);
|
||||
int eprintf_time(int level, int var, u64 t, const char *fmt, ...) __printf(4, 5);
|
||||
int veprintf(int level, int var, const char *fmt, va_list args);
|
||||
|
||||
int perf_debug_option(const char *str);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue