From: Brian Paul Date: Tue, 29 Jan 2013 23:48:25 +0000 (-0700) Subject: trace: allow GALLIUM_TRACE=stdout/stderr X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fe20e3ebb50a2aad4accbba0bb178bd5c29fc556;p=mesa.git trace: allow GALLIUM_TRACE=stdout/stderr --- diff --git a/src/gallium/drivers/trace/tr_dump.c b/src/gallium/drivers/trace/tr_dump.c index 90befb09b6b..0714e9a3860 100644 --- a/src/gallium/drivers/trace/tr_dump.c +++ b/src/gallium/drivers/trace/tr_dump.c @@ -244,9 +244,17 @@ boolean trace_dump_trace_begin() if(!stream) { - stream = fopen(filename, "wt"); - if(!stream) - return FALSE; + if (strcmp(filename, "stderr") == 0) { + stream = stderr; + } + else if (strcmp(filename, "stdout") == 0) { + stream = stdout; + } + else { + stream = fopen(filename, "wt"); + if (!stream) + return FALSE; + } trace_dump_writes("\n"); trace_dump_writes("\n");