summaryrefslogtreecommitdiffstats
path: root/sys.c
blob: fdb32d983acb907efcd7b8a366d42fc5eda129be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <stdio.h>
#include <unistd.h>
#include <stdarg.h>
#include <stdlib.h>

#include "include/log.h"
#include "include/sys.h"

int system_printf(char *fmt, ...)
{
	char p[256];
	va_list ap;
	int r;
	va_start(ap, fmt);
	vsnprintf(p, 256, fmt, ap);
	va_end(ap);
	r = system(p);
	return r;
}