mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04: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:
parent
13087ee99f
commit
7383a0591c
2 changed files with 15 additions and 12 deletions
|
|
@ -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_ */
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue