Signed-off-by: Masatake YAMATO <yamato@redhat.com>
return opendir(path);
}
+
+FILE *fopenf(const char *mode, const char *format, ...)
+{
+ va_list ap;
+ char path[PATH_MAX];
+
+ memset(path, 0, sizeof(path));
+
+ va_start(ap, format);
+ vsprintf(path, format, ap);
+ va_end(ap);
+
+ return fopen(path, mode);
+}
} while (0)
DIR *opendirf(const char *format, ...) __attribute__((format (printf, 1, 2)));
+FILE *fopenf(const char *mode, const char *format, ...) __attribute__((format (printf, 2, 3)));
/*
* column IDs