MT#59069 pass metafile to output_new

to make it possible to support more formats.

Functional no-op.

Change-Id: Iae06b1247291f9b45eccc8959148918da8fc6c12
mr12.2
Richard Fuchs 2 years ago
parent 8f011136a8
commit 9096341fb2

@ -100,13 +100,13 @@ static output_t *output_alloc(const char *path, const char *name) {
return ret; return ret;
} }
static output_t *output_new(const char *path, const char *call, const char *type, const char *kind, static output_t *output_new(const char *path, const metafile_t *mf, const char *type, const char *kind,
const char *label) const char *label)
{ {
// construct output file name // construct output file name
struct timeval now; struct timeval now;
struct tm tm; struct tm tm;
const char *ax = call; const char *ax = mf->parent;
gettimeofday(&now, NULL); gettimeofday(&now, NULL);
localtime_r(&now.tv_sec, &tm); localtime_r(&now.tv_sec, &tm);
@ -126,7 +126,7 @@ static output_t *output_new(const char *path, const char *call, const char *type
g_string_append_c(f, '%'); g_string_append_c(f, '%');
break; break;
case 'c': case 'c':
g_string_append(f, call); g_string_append(f, mf->parent);
break; break;
case 't': case 't':
g_string_append(f, type); g_string_append(f, type);
@ -216,7 +216,7 @@ output_t *output_new_ext(metafile_t *mf, const char *type, const char *kind, con
g_free(path); g_free(path);
} }
else else
ret = output_new(output_dir, mf->parent, type, kind, label); ret = output_new(output_dir, mf, type, kind, label);
return ret; return ret;
} }

Loading…
Cancel
Save