|
From: | Richard Henderson |
Subject: | Re: [PATCH] tests/qtest/virtio-net-failover: Use g_random_int() instead of g_test_rand_int() |
Date: | Tue, 21 Dec 2021 11:32:50 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 |
On 12/21/21 2:32 AM, Thomas Huth wrote:
Using g_file_open_tmp is certainly better ... but the tests are currently written in a way where they require the file name of the temporary file - so switching to g_file_open_tmp() (which only provides a file handle) certainly would need some rewrite here...
Incorrect. g_file_open_tmp returns the open file handle, but also returns the filename in *name_used.
I should think you can close the file handle straight away and use the filename. r~
[Prev in Thread] | Current Thread | [Next in Thread] |