1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

The kasprintf() function cannot be inlined due to using a variable

number of arguments. Move it to a C-file in the linuxapi module to
make the function usable.

Sponsored by:	Mellanox Technologies
MFC after:	3 days
This commit is contained in:
Hans Petter Selasky 2015-02-16 21:22:56 +00:00
parent 13087ee99f
commit 7383a0591c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=278865
2 changed files with 15 additions and 12 deletions

View File

@ -431,17 +431,6 @@ static inline char *kvasprintf(gfp_t gfp, const char *fmt, va_list ap)
return p;
}
static inline char *kasprintf(gfp_t gfp, const char *fmt, ...)
{
va_list ap;
char *p;
va_start(ap, fmt);
p = kvasprintf(gfp, fmt, ap);
va_end(ap);
return p;
}
char *kasprintf(gfp_t, const char *, ...);
#endif /* _LINUX_DEVICE_H_ */

View File

@ -712,6 +712,20 @@ vunmap(void *addr)
kfree(vmmap);
}
char *
kasprintf(gfp_t gfp, const char *fmt, ...)
{
va_list ap;
char *p;
va_start(ap, fmt);
p = kvasprintf(gfp, fmt, ap);
va_end(ap);
return p;
}
static void
linux_compat_init(void)
{