[PATCH 3/3] virfile: Use g_canonicalize_file() to simplify virFileAbsPath()

Martin Kletzander mkletzan at redhat.com
Fri Jun 4 12:41:15 UTC 2021


On Fri, Jun 04, 2021 at 07:38:42PM +0800, Luke Yue wrote:
>On Fri, 2021-06-04 at 12:28 +0200, Martin Kletzander wrote:
>> On Mon, May 31, 2021 at 09:48:24AM +0800, Luke Yue wrote:
>> > Though the comment says that the function may return -1 on error,
>> > but it
>> > seems that now it will never return -1 now. So just use
>> > g_canonicalize_file()
>> > to simplify the implementation.
>> >
>>
>> Yeah, that is a leftover from before we started using glib and
>> abort()'ing on OOM.  It would be nice if that leftover got cleaned up
>> as
>> well.  However, looking at it, we can remove the function altogether
>> and
>> just use the glib counterpart.  That'd be even more of a clean up ;)
>
>Thanks for the review!
>
>I will try to replace all the funciton calls with g_canonicalize_file()
>and remove the function in a new patch.
>

Thanks.  In the meantime I pushed the PATCH 1/3.

>Luke
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20210604/8055e89c/attachment-0001.sig>


More information about the libvir-list mailing list