The patch titled Add kvasprintf() has been removed from the -mm tree. Its filename was add-kvasprintf.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ Subject: Add kvasprintf() From: Jeremy Fitzhardinge <jeremy@xxxxxxxx> Add a kvasprintf() function to complement kasprintf(). No in-tree users yet, but I have some coming up. [akpm@xxxxxxxxxxxxxxxxxxxx: EXPORT it] Signed-off-by: Jeremy Fitzhardinge <jeremy@xxxxxxxxxxxxx> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: Keir Fraser <keir@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/kernel.h | 1 + lib/vsprintf.c | 26 +++++++++++++++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) diff -puN include/linux/kernel.h~add-kvasprintf include/linux/kernel.h --- a/include/linux/kernel.h~add-kvasprintf +++ a/include/linux/kernel.h @@ -121,6 +121,7 @@ extern int vscnprintf(char *buf, size_t __attribute__ ((format (printf, 3, 0))); extern char *kasprintf(gfp_t gfp, const char *fmt, ...) __attribute__ ((format (printf, 2, 3))); +extern char *kvasprintf(gfp_t gfp, const char *fmt, va_list args); extern int sscanf(const char *, const char *, ...) __attribute__ ((format (scanf, 2, 3))); diff -puN lib/vsprintf.c~add-kvasprintf lib/vsprintf.c --- a/lib/vsprintf.c~add-kvasprintf +++ a/lib/vsprintf.c @@ -851,23 +851,35 @@ EXPORT_SYMBOL(sscanf); /* Simplified asprintf. */ -char *kasprintf(gfp_t gfp, const char *fmt, ...) +char *kvasprintf(gfp_t gfp, const char *fmt, va_list ap) { - va_list ap; unsigned int len; char *p; + va_list aq; - va_start(ap, fmt); - len = vsnprintf(NULL, 0, fmt, ap); - va_end(ap); + va_copy(aq, ap); + len = vsnprintf(NULL, 0, fmt, aq); + va_end(aq); p = kmalloc(len+1, gfp); if (!p) return NULL; - va_start(ap, fmt); + vsnprintf(p, len+1, fmt, ap); - va_end(ap); + return p; } +EXPORT_SYMBOL(kvasprintf); + +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; +} EXPORT_SYMBOL(kasprintf); _ Patches currently in -mm which might be from jeremy@xxxxxxxx are origin.patch add-apply_to_page_range-which-applies-a-function-to-a-pte-range.patch i386-map-enough-initial-memory-to-create-lowmem-mappings-fix.patch maps2-uninline-some-functions-in-the-page-walker.patch maps2-eliminate-the-pmd_walker-struct-in-the-page-walker.patch maps2-remove-vma-from-args-in-the-page-walker.patch maps2-propagate-errors-from-callback-in-page-walker.patch maps2-add-callbacks-for-each-level-to-page-walker.patch maps2-move-the-page-walker-code-to-lib.patch maps2-simplify-interdependence-of-proc-pid-maps-and-smaps.patch maps2-move-clear_refs-code-to-task_mmuc.patch maps2-regroup-task_mmu-by-interface.patch maps2-make-proc-pid-smaps-optional-under-config_embedded.patch maps2-make-proc-pid-clear_refs-option-under-config_embedded.patch maps2-add-proc-pid-pagemap-interface.patch maps2-add-proc-kpagemap-interface.patch fixes-and-cleanups-for-earlyprintk-aka-boot-console.patch ignore-stolen-time-in-the-softlockup-watchdog.patch add-touch_all_softlockup_watchdogs.patch lguest-vs-x86_64-mm-use-per-cpu-variables-for-gdt-pda.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html