diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2023-10-17 21:40:46 +0200 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2023-10-17 21:40:46 +0200 |
| commit | a940daa52167e9db8ecce82213813b735a9d9f23 (patch) | |
| tree | d5346c51351ccd1da7532cbec3127e6b73ec59c9 /include/linux/sprintf.h | |
| parent | 32e4fa37fa667fdf53499b9de92737dc75199d8e (diff) | |
| parent | 58720809f52779dc0f08e53e54b014209d13eebb (diff) | |
Merge branch 'linus' into smp/core
Pull in upstream to get the fixes so depending changes can be applied.
Diffstat (limited to 'include/linux/sprintf.h')
| -rw-r--r-- | include/linux/sprintf.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/linux/sprintf.h b/include/linux/sprintf.h new file mode 100644 index 000000000000..33dcbec71925 --- /dev/null +++ b/include/linux/sprintf.h @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_KERNEL_SPRINTF_H_ +#define _LINUX_KERNEL_SPRINTF_H_ + +#include <linux/compiler_attributes.h> +#include <linux/types.h> + +int num_to_str(char *buf, int size, unsigned long long num, unsigned int width); + +__printf(2, 3) int sprintf(char *buf, const char * fmt, ...); +__printf(2, 0) int vsprintf(char *buf, const char *, va_list); +__printf(3, 4) int snprintf(char *buf, size_t size, const char *fmt, ...); +__printf(3, 0) int vsnprintf(char *buf, size_t size, const char *fmt, va_list args); +__printf(3, 4) int scnprintf(char *buf, size_t size, const char *fmt, ...); +__printf(3, 0) int vscnprintf(char *buf, size_t size, const char *fmt, va_list args); +__printf(2, 3) __malloc char *kasprintf(gfp_t gfp, const char *fmt, ...); +__printf(2, 0) __malloc char *kvasprintf(gfp_t gfp, const char *fmt, va_list args); +__printf(2, 0) const char *kvasprintf_const(gfp_t gfp, const char *fmt, va_list args); + +__scanf(2, 3) int sscanf(const char *, const char *, ...); +__scanf(2, 0) int vsscanf(const char *, const char *, va_list); + +/* These are for specific cases, do not use without real need */ +extern bool no_hash_pointers; +int no_hash_pointers_enable(char *str); + +#endif /* _LINUX_KERNEL_SPRINTF_H */ |
