]> git.lizzy.rs Git - plan9front.git/blob - sys/src/libstdio/vsprintf.c
kernel: avoid selecting the boot process in killbig()
[plan9front.git] / sys / src / libstdio / vsprintf.c
1 /*
2  * pANS stdio -- vsprintf
3  */
4 #include "iolib.h"
5 int vsprintf(char *buf, const char *fmt, va_list args){
6         int n;
7         FILE *f=sopenw();
8         if(f==NULL)
9                 return 0;
10         setvbuf(f, buf, _IOFBF, 100000);
11         n=vfprintf(f, fmt, args);
12         sclose(f);
13         return n;
14 }