[PATCH 0/3] Replace some libvirt handling functions with GLib APIs

Luke Yue lukedyue at gmail.com
Mon May 31 01:48:21 UTC 2021


Note that the g_find_program_in_path() will search file in current dir
when PATH env is not set, while virFindFileInPath() won't.

The virFileAbsPath() could be replaced by g_canonicalize_file() when not
take the return value into account, and it just simply return 0 now, so
maybe remove the function is a better choice?

Related issue: https://gitlab.com/libvirt/libvirt/-/issues/12

Luke Yue (3):
  virfile: Use g_build_filename() when building paths
  virfile: Simplify virFindFileInPath() with g_find_program_in_path()
  virfile: Use g_canonicalize_file() to simplify virFileAbsPath()

 src/util/virfile.c | 71 +++++++++++++---------------------------------
 1 file changed, 19 insertions(+), 52 deletions(-)

-- 
2.31.1




More information about the libvir-list mailing list