[Mesa-dev] [PATCH] gallium/hud: set the dump file streams to line buffered
Julien Isorce
julien.isorce at gmail.com
Tue Apr 4 22:29:48 UTC 2017
I confirm it works, awesome! Thx!
Should you check that fopen succeeded ? because I think setvbuf would
crash otherwise.
That's said:
Tested-by: Julien Isorce <jisorce at oblong.com>
On 4 April 2017 at 21:52, Edmondo Tommasina <edmondo.tommasina at gmail.com>
wrote:
> Flush the HUD value streams to the dump files after every newline.
> ---
> src/gallium/auxiliary/hud/hud_context.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/gallium/auxiliary/hud/hud_context.c
> b/src/gallium/auxiliary/hud/hud_context.c
> index 29ef9eee31..633e3650cc 100644
> --- a/src/gallium/auxiliary/hud/hud_context.c
> +++ b/src/gallium/auxiliary/hud/hud_context.c
> @@ -972,6 +972,7 @@ hud_graph_set_dump_file(struct hud_graph *gr)
> strcat(dump_file, "/");
> strcat_without_spaces(dump_file, gr->name);
> gr->fd = fopen(dump_file, "w+");
> + setvbuf(gr->fd, NULL, _IOLBF, 0);
> free(dump_file);
> }
> }
> --
> 2.11.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170404/bc28cc16/attachment.html>
More information about the mesa-dev
mailing list