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>
SPL_AC_FS_STRUCT_SPINLOCK
SPL_AC_KUIDGID_T
SPL_AC_PUT_TASK_STRUCT
- SPL_AC_KVASPRINTF
SPL_AC_EXPORTED_RWSEM_IS_LOCKED
SPL_AC_KERNEL_FALLOCATE
SPL_AC_KERN_PATH
])
])
-dnl #
-dnl # 2.6.x API change,
-dnl # kvasprintf() function added.
-dnl #
-AC_DEFUN([SPL_AC_KVASPRINTF],
- [AC_MSG_CHECKING([whether kvasprintf() is available])
- SPL_LINUX_TRY_COMPILE_SYMBOL([
- #include <linux/kernel.h>
- ], [
- kvasprintf(0, NULL, *((va_list*)NULL));
- ], [kvasprintf], [], [
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_KVASPRINTF, 1, [kvasprintf() is available])
- ], [
- AC_MSG_RESULT(no)
- ])
-])
-
dnl #
dnl # 2.6.29 API change,
dnl # vfs_fsync() funcation added, prior to this use file_fsync().
}
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)
{