diff options
author | Brian Paul <[email protected]> | 2013-01-29 16:48:25 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2013-02-01 08:00:28 -0700 |
commit | fe20e3ebb50a2aad4accbba0bb178bd5c29fc556 (patch) | |
tree | c4def14c79e10649fba62a98c954b7e3c017a2b6 /src/gallium/drivers/trace | |
parent | 225228a7f59e7435e39e72f9acda6aa125f05bf8 (diff) |
trace: allow GALLIUM_TRACE=stdout/stderr
Diffstat (limited to 'src/gallium/drivers/trace')
-rw-r--r-- | src/gallium/drivers/trace/tr_dump.c | 14 |
1 files changed, 11 insertions, 3 deletions
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("<?xml version='1.0' encoding='UTF-8'?>\n"); trace_dump_writes("<?xml-stylesheet type='text/xsl' href='trace.xsl'?>\n"); |