mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[PATCH] Implement kasprintf
Implement kasprintf, a kernel version of asprintf. This allocates the memory required for the formatted string, including the trailing '\0'. Returns NULL on allocation failure. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
f796937a06
commit
e905914f96
2 changed files with 25 additions and 0 deletions
|
@ -117,6 +117,8 @@ extern int scnprintf(char * buf, size_t size, const char * fmt, ...)
|
|||
__attribute__ ((format (printf, 3, 4)));
|
||||
extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args)
|
||||
__attribute__ ((format (printf, 3, 0)));
|
||||
extern char *kasprintf(gfp_t gfp, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 2, 3)));
|
||||
|
||||
extern int sscanf(const char *, const char *, ...)
|
||||
__attribute__ ((format (scanf, 2, 3)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue