mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Remove kvasprintf() wrapper
The kvasprintf() function has been available since Linux 2.6.22. There is no longer a need to maintain this compatibility code. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
@@ -128,29 +128,6 @@ kmem_debugging(void)
|
||||
}
|
||||
EXPORT_SYMBOL(kmem_debugging);
|
||||
|
||||
#ifndef HAVE_KVASPRINTF
|
||||
/* Simplified asprintf. */
|
||||
char *kvasprintf(gfp_t gfp, const char *fmt, va_list ap)
|
||||
{
|
||||
unsigned int len;
|
||||
char *p;
|
||||
va_list aq;
|
||||
|
||||
va_copy(aq, ap);
|
||||
len = vsnprintf(NULL, 0, fmt, aq);
|
||||
va_end(aq);
|
||||
|
||||
p = kmalloc(len+1, gfp);
|
||||
if (!p)
|
||||
return NULL;
|
||||
|
||||
vsnprintf(p, len+1, fmt, ap);
|
||||
|
||||
return p;
|
||||
}
|
||||
EXPORT_SYMBOL(kvasprintf);
|
||||
#endif /* HAVE_KVASPRINTF */
|
||||
|
||||
char *
|
||||
kmem_vasprintf(const char *fmt, va_list ap)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user