init
Description:
Call this function before using any other Libvirt GLib functions in your applications.
It will initialize everything needed to operate the toolkit and parses some standard command line options.
Although you are expected to pass the argv.length
, argv
parameters from main
to this function, it is
possible to pass NULL if argv
is not available or commandline handling is not required.
argv.length
and argv
are adjusted accordingly so your own code will never see those standard arguments.
This method will also turn on debug logging of the library if the LIBVIRT_GLIB_DEBUG environment variable is set.
This function will terminate your program if it was unable to initialize for some reason. If you want the program to fall back to an alternate
mode of operation call gvir_init_check
instead.
Parameters:
argv |
Address of the |
argc |
Address of the argc parameter of your |