diff options
Diffstat (limited to 'src')
-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"); |