aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@xensource.com>2006-06-25 08:49:17 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-25 13:01:23 -0400
commite905914f96e11862b130dd229f73045dad9a34e8 (patch)
tree0e7cff381970e2439de521c3d42ded8c49f69354 /include
parentf796937a062c7aeb44cd0e75e1586c8543634a7d (diff)
[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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/kernel.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 8c21aaa248b4..3c5e4c2e517d 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -117,6 +117,8 @@ extern int scnprintf(char * buf, size_t size, const char * fmt, ...)
117 __attribute__ ((format (printf, 3, 4))); 117 __attribute__ ((format (printf, 3, 4)));
118extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args) 118extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args)
119 __attribute__ ((format (printf, 3, 0))); 119 __attribute__ ((format (printf, 3, 0)));
120extern char *kasprintf(gfp_t gfp, const char *fmt, ...)
121 __attribute__ ((format (printf, 2, 3)));
120 122
121extern int sscanf(const char *, const char *, ...) 123extern int sscanf(const char *, const char *, ...)
122 __attribute__ ((format (scanf, 2, 3))); 124 __attribute__ ((format (scanf, 2, 3)));