search for: virseterrorfunc

Displaying 20 results from an estimated 22 matches for "virseterrorfunc".

2013 Oct 14
2
Re: event handler
...nt loop: %s\n", err && >>>> err->message ? err->message : "Unknown error"); >>>> } >>>> } >>>> } >>>> >>>> >>>> >>>> ... >>>> >>>> virSetErrorFunc(NULL, libvirt_error_handler); >>>> libvirt_connection = virConnectOpen("qemu:///system"); >>> >>> Move this line ^^^ ... >>> >>>> if (virEventRegisterDefaultImpl() < 0) >>>> { >>>> virError...
2013 Oct 14
2
Re: event handler
...virGetLastError(); >> fprintf(stderr, "Failed to run event loop: %s\n", err && >> err->message ? err->message : "Unknown error"); >> } >> } >> } >> >> >> >> ... >> >> virSetErrorFunc(NULL, libvirt_error_handler); >> libvirt_connection = virConnectOpen("qemu:///system"); > > Move this line ^^^ ... > >> if (virEventRegisterDefaultImpl() < 0) >> { >> virErrorPtr err = virGetLastError(); >> fprintf(st...
2013 Oct 14
2
event handler
...hr_func() { while(true) //TODO: stop somehow on exit { if(virEventRunDefaultImpl() < 0) { virErrorPtr err = virGetLastError(); fprintf(stderr, "Failed to run event loop: %s\n", err && err->message ? err->message : "Unknown error"); } } } ... virSetErrorFunc(NULL, libvirt_error_handler); libvirt_connection = virConnectOpen("qemu:///system"); if (virEventRegisterDefaultImpl() < 0) { virErrorPtr err = virGetLastError(); fprintf(stderr, "Failed to register event implementation: %s\n", err && err->message ? err-&gt...
2013 Oct 14
0
Re: event handler
...>>>>> err->message ? err->message : "Unknown error"); >>>>> } >>>>> } >>>>> } >>>>> >>>>> >>>>> >>>>> ... >>>>> >>>>> virSetErrorFunc(NULL, libvirt_error_handler); >>>>> libvirt_connection = virConnectOpen("qemu:///system"); >>>> >>>> Move this line ^^^ ... >>>> >>>>> if (virEventRegisterDefaultImpl() < 0) >>>>> { >>&gt...
2015 Jun 11
2
Re: [PATCH 3/5] threads: Use thread-local storage for errors.
...lt > error handler). I haven't yet worked out a better way to solve this. Do you have a feeling whether the error handler function push/pop is a commonly used feature or not ? In libvirt we originally had virGetLastError (global error) virConnGetLastError (per connection error) virSetErrorFunc (global error handler func) When we introduced thread support we didn't try to make the virConnGetLastError/SetErrorFun work. We just updated the docs to tell applications to /never/ use them in threaded applications, and always use the virGetLastError which was thread-local backed. For ba...
2013 Jul 08
2
Re: deadlock on connection loosing
On 07.07.2013 01:53, Александр wrote: > В письме от Воскресенье, 30-июн-2013 03:41:37 пользователь Александр написал: >> В письме от Вторник, 25-июн-2013 11:47:10 пользователь Michal Privoznik .... > > i have found source of problem, my code looks like this: > > int count = virConnectListAllDomains(connection, NULL, 0); > .... > domain = virDomainDefineXML(connection,
2013 Aug 22
1
Re: virConnectDomainEventRegisterAny problem
...p_thr_func() { while(true) //TODO: stop somehow on exit { if(virEventRunDefaultImpl() < 0) { virErrorPtr err = virGetLastError(); fprintf(stderr, "Failed to run event loop: %s\n", err && err->message ? err->message : "Unknown error"); } } } .... virSetErrorFunc(NULL, libvirt_error_handler); libvirt_connection = virConnectOpen("qemu:///system"); if(libvirt_connection == NULL) { std::cout<<"failed to connect to qemu:///system\n"; return -1; } std::cout<<"connected to qemu:///system\n"; if (virEventRegis...
2013 Jul 08
0
Re: deadlock on connection loosing
...tderr, " str1: %s\n", err->str1); fprintf(stderr, " str2: %s\n", err->str2); fprintf(stderr, " str3: %s\n", err->str3); fprintf(stderr, " int1: %d\n", err->int1); fprintf(stderr, " int2: %d\n", err->int2); } int init_libvirt() { virSetErrorFunc(NULL, libvirt_error_handler); libvirt_connection = virConnectOpen("qemu:///system"); ..... i will also check virConnectListAllDomains with correct pointer instead of null later, now have some other work to do.
2013 Oct 14
0
Re: event handler
...{ > virErrorPtr err = virGetLastError(); > fprintf(stderr, "Failed to run event loop: %s\n", err && > err->message ? err->message : "Unknown error"); > } > } > } > > > > ... > > virSetErrorFunc(NULL, libvirt_error_handler); > libvirt_connection = virConnectOpen("qemu:///system"); Move this line ^^^ ... > if (virEventRegisterDefaultImpl() < 0) > { > virErrorPtr err = virGetLastError(); > fprintf(stderr, "Failed to register even...
2013 Oct 14
0
Re: event handler
...fprintf(stderr, "Failed to run event loop: %s\n", err && >>> err->message ? err->message : "Unknown error"); >>> } >>> } >>> } >>> >>> >>> >>> ... >>> >>> virSetErrorFunc(NULL, libvirt_error_handler); >>> libvirt_connection = virConnectOpen("qemu:///system"); >> >> Move this line ^^^ ... >> >>> if (virEventRegisterDefaultImpl() < 0) >>> { >>> virErrorPtr err = virGetLastError(); &...
2015 Jun 11
0
Re: [PATCH 3/5] threads: Use thread-local storage for errors.
...e, in our code: $ git grep -E 'guestfs_(push|pop)_error_handler' -- *.c | wc -l 83 Of course we could change those, but it is still an API guarantee. > In libvirt we originally had > > virGetLastError (global error) > virConnGetLastError (per connection error) > virSetErrorFunc (global error handler func) > > When we introduced thread support we didn't try to make the > virConnGetLastError/SetErrorFun work. We just updated the docs > to tell applications to /never/ use them in threaded applications, > and always use the virGetLastError which was th...
2020 Jan 10
2
Re: [PATCH Fedora libguestfs] Don't depend on libvirt-daemon-kvm monolith.
...ror ( virGetVersion ( virInitialize ( virNetworkFree ( virNodeGetCellsFreeMemory ( virNodeGetFreeMemory ( virNodeGetInfo ( virResetLastError ( virSecretDefineXML ( virSecretFree ( virSecretGetUUIDString ( virSecretGetValue ( virSecretLookupByUsage ( virSecretLookupByUUIDString ( virSecretSetValue ( virSetErrorFunc ( virStoragePoolFree ( virStoragePoolGetInfo ( virStoragePoolLookupByName ( virStorageVolFree ( virStorageVolGetInfo ( virStorageVolGetPath ( virStorageVolLookupByName ( --rbKG8BlqS9xyY7Uh--
2013 Aug 21
2
Re: virConnectDomainEventRegisterAny problem
On Wed, Aug 21, 2013 at 12:36:06PM +0300, Alexandr wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > 21.08.2013 09:46, Alexandr пишет: > > 21.08.2013 09:32, Martin Kletzander пишет: > >> On Wed 21 Aug 2013 01:03:37 AM CEST, Alexandr wrote: > >>> > >>> good day. i trying to make callback function for > >>>
2020 Jan 10
5
[PATCH Fedora libguestfs] Don't depend on libvirt-daemon-kvm monolith.
libguestfs usually needs qemu. However it only requires an emulator for the same architecture, not for all architectures. libvirt-daemon-kvm pulls in qemu which pulls in emulators for all architectures, as well as a bunch of other stuff we don't need at all like network interface support and nwfilter. There are no Fedora TCG-only arches, so drop the conditional section. I also made support
2015 Jun 06
7
[PATCH 0/5] Add support for thread-safe handle.
This patch isn't ready to go upstream. In fact, I think we might do a quick 1.30 release soon, and save this patch, and also the extensive changes proposed for the test suite[1], to after 1.30. Currently it is not safe to use the same handle from multiple threads, unless you implement your own mutexes. See: http://libguestfs.org/guestfs.3.html#multiple-handles-and-multiple-threads These
2019 Apr 08
0
[PATCH v4 2/7] common: Bundle the libvirt-ocaml library for use by virt-v2v
...n (Val_unit); +} + +/*----------------------------------------------------------------------*/ + +static void +ignore_errors (void *user_data, virErrorPtr error) +{ + /* do nothing */ +} + +/* Initialise the library. */ +CAMLprim value +ocaml_libvirt_init (value unit) +{ + CAMLparam1 (unit); + + virSetErrorFunc (NULL, ignore_errors); + virInitialize (); + + CAMLreturn (Val_unit); +} diff --git a/common/mllibvirt/libvirt_c_prologue.c b/common/mllibvirt/libvirt_c_prologue.c new file mode 100644 index 000000000..8533618c6 --- /dev/null +++ b/common/mllibvirt/libvirt_c_prologue.c @@ -0,0 +1,134 @@ +/* OCaml...
2019 Dec 16
3
[v2v PATCH 0/2] Move libvirt-ocaml copy to v2v repo
libvirt-ocaml is used only by virt-v2v, so move it to this repository, instead of having it around in the common submodule. The removal from common will happen later. Pino Toscano (2): common: Bundle the libvirt-ocaml library for use by virt-v2v build: switch embedded copy of libvirt-ocaml .gitignore | 2 + 3rdparty/libvirt-ocaml/Makefile.am |
2018 Aug 30
8
[PATCH 0/7] RFC: switch v2v to ocaml-libvirt
Hi, this is a mostly done attempt to switch to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not
2018 Nov 27
8
[PATCH v2 0/7] RFC: switch v2v to ocaml-libvirt
Hi, this is a mostly done attempt to switch to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not
2019 Jan 30
8
[PATCH v3 0/7] RFC: switch v2v to ocaml-libvirt
Hi, this is a mostly done attempt to switch to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not