From fe20e3ebb50a2aad4accbba0bb178bd5c29fc556 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 29 Jan 2013 16:48:25 -0700 Subject: [PATCH] trace: allow GALLIUM_TRACE=stdout/stderr --- src/gallium/drivers/trace/tr_dump.c | 14 +++++++++++--- 1 file 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("\n"); trace_dump_writes("\n"); -- 2.30.2