search for: guestfs_set_hv

Displaying 17 results from an estimated 17 matches for "guestfs_set_hv".

Did you mean: guestfs_get_hv
2018 Oct 04
2
Re: [PATCH v2] lib: Use qemu-img info -U option to avoid locking error.
...img -U option since both features were added within a few months. However the problem is that testing for this requires us to run qemu before launch is called. That has API issues because it's unclear what code like: g = guestfs_create (); guestfs_disk_format (g, "disk.img"); guestfs_set_hv (g, "my-weird-qemu"); guestfs_launch (g); should do (granted, it is a peculiar corner case and the caller probably gets what they deserve). > One possible idea can be to cache the qemu_data struct in the handle, > so the direct backend would not get a performance regression (sin...
2017 Jul 21
0
[PATCH v3 REPOST 5/5] threads: Add a test.
...ead[%d] failed\n", i); + exit (EXIT_FAILURE); + } + } + } + + guestfs_close (g); + + exit (EXIT_SUCCESS); +} + +static void * +start_thread (void *nullv) +{ + char *p; + const char *err; + int iterations; + + for (iterations = 0; iterations < 1000; ++iterations) { + guestfs_set_hv (g, "test"); + p = guestfs_get_hv (g); + if (!p || STRNEQ (p, "test")) { + fprintf (stderr, "invalid return from guestfs_get_hv\n"); + pthread_exit ((void *)-1); + } + free (p); + + guestfs_push_error_handler (g, NULL, NULL); + guestfs_set_h...
2018 Oct 04
1
Re: [PATCH v2] lib: Use qemu-img info -U option to avoid locking error.
...; > However the problem is that testing for this requires us to run qemu > > before launch is called. That has API issues because it's unclear > > what code like: > > > > g = guestfs_create (); > > guestfs_disk_format (g, "disk.img"); > > guestfs_set_hv (g, "my-weird-qemu"); > > guestfs_launch (g); > > > > should do (granted, it is a peculiar corner case and the caller > > probably gets what they deserve). > > > > > One possible idea can be to cache the qemu_data struct in the handle, > >...
2017 Oct 05
0
Re: --with-qemu option in libguestfs
...h-qemu=...’ option takes a list of possible qemu binary names. It searches the $PATH for each until it finds that name. Libguestfs uses this for various things: - As a default setting for the hypervisor in the handle, which you can override at runtime: http://libguestfs.org/guestfs.3.html#guestfs_set_hv - At configure time we need to test various features of qemu, although generally speaking we are trying to reduce the need to test qemu features at compile time, preferring instead to test at runtime. In fact most of the configure-time tests could now be dropped if we just assumed &q...
2018 Oct 04
0
Re: [PATCH v2] lib: Use qemu-img info -U option to avoid locking error.
...dded within a few months. > > However the problem is that testing for this requires us to run qemu > before launch is called. That has API issues because it's unclear > what code like: > > g = guestfs_create (); > guestfs_disk_format (g, "disk.img"); > guestfs_set_hv (g, "my-weird-qemu"); > guestfs_launch (g); > > should do (granted, it is a peculiar corner case and the caller > probably gets what they deserve). > > > One possible idea can be to cache the qemu_data struct in the handle, > > so the direct backend would no...
2015 May 26
6
[PATCH 0/6] Update the way that API versions are generated for the man page.
The existing mechanism was clunky, slow and used ~ 10 MB of local disk. Rich.
2014 Jun 27
3
[PATCH WIP] Can't generate argv variant
Hi everyone, lately I've been getting familiar with library and working on slight re-layering of the library. It's about having locking layer in public API and tracing one layer below that (let's call it __t_ layer. I'm not very good at making up names, so this is temporary:) ). Then making sure that all generated public stuff call __t_ layer and all other internal stuff
2016 Mar 18
9
[PATCH 0/7] Small portability changes
Assorted collection of small improvements in making libguestfs build on non-Linux OSes; most of the changes impact tests though. Thanks, Pino Toscano (7): build: check the path of fuser, and use it in FUSE code tests: move guestfs-md5.sh to test-data v2v: tests: isolate SHA1 calculation in an own shared function v2v: tests: use guestfs-hashsums.sh for MD5 php: pass $(MAKE) to
2014 Jan 01
0
[PATCH] Allow ./configure --without-qemu.
From: "Richard W.M. Jones" <rjones at redhat.com> This means there will be no default hypervisor, and effectively the user will always have to specify one (eg. by setting LIBGUESTFS_HV or calling guestfs_set_hv). This is useful on platforms where qemu doesn't work, or where qemu is not needed (eg. if you want to use UML, or you just want to compile libguestfs without using/testing it). --- configure.ac | 125 ++++++++++++++++++++++------------------- src/handle.c...
2018 Sep 21
4
[PATCH v2] lib: Use qemu-img info -U option to avoid locking error.
https://bugs.launchpad.net/qemu/+bug/1740364 --- lib/guestfs-internal.h | 3 +++ lib/handle.c | 2 ++ lib/info.c | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+) diff --git a/lib/guestfs-internal.h b/lib/guestfs-internal.h index adeb9478a..c66c55e70 100644 --- a/lib/guestfs-internal.h +++ b/lib/guestfs-internal.h @@ -510,6 +510,9 @@ struct
2015 Jun 16
5
[PATCH threads v2 0/5] Add support for thread-safe handle.
Previous discussion here: https://www.redhat.com/archives/libguestfs/2015-June/thread.html#00048 v2: - Use a cleanup handler to release the lock. - Rebase to upstream. Note I have not fixed the problem(s) with error handling (patch 3).
2017 Jun 27
9
[PATCH v3 0/5] threads: Add support for thread-safe handle.
Previously posted in 2015: v1: https://www.redhat.com/archives/libguestfs/2015-June/msg00048.html v2: https://www.redhat.com/archives/libguestfs/2015-June/msg00118.html I have rebased and tidied up the patches, fixing a few spelling mistakes, but they are broadly the same as before. I also ran all the tests, which pass. As with the previous versions, this makes a change to the API, where you
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
2017 Jul 21
6
[PATCH v3 REPOST 0/5] threads: Add support for thread-safe handle.
Previously posted in 2015: v1: https://www.redhat.com/archives/libguestfs/2015-June/msg00048.html v2: https://www.redhat.com/archives/libguestfs/2015-June/msg00118.html This series was posted about 4 weeks ago: v3: https://www.redhat.com/archives/libguestfs/2017-June/msg00287.html There is no change in this series except I rebased it against current upstream head and retested. Last time there
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
...quot;Binary '%s' does not exist or is not executable\n"), - path); - exit (EXIT_FAILURE); - } + if (access (path, X_OK) == -1) + error (EXIT_FAILURE, errno, + _("binary '%s' does not exist or is not executable"), path); guestfs_set_hv (g, path); return; @@ -371,14 +325,9 @@ set_qemu (guestfs_h *g, const char *path, int use_wrapper) if (asprintf (&buffer, "%s/pc-bios", path) == -1) error (EXIT_FAILURE, errno, "asprintf"); if (stat (buffer, &statbuf) == -1 || - !S_ISDIR (statbuf.st_...
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
Wherever we had code which did: if (something_bad) { perror (...); exit (EXIT_FAILURE); } replace this with use of the error(3) function: if (something_bad) error (EXIT_FAILURE, errno, ...); The error(3) function is supplied by glibc, or by gnulib on platforms which don't have it, and is much more flexible than perror(3). Since we already use error(3), there seems to be
2017 Apr 04
1
[PATCH] Use Unicode single quotes ‘’ in place of short single quoted strings throughout.
...th, int use_wrapper) if (!use_wrapper) { if (access (path, X_OK) == -1) error (EXIT_FAILURE, errno, - _("binary '%s' does not exist or is not executable"), path); + _("binary ‘%s’ does not exist or is not executable"), path); guestfs_set_hv (g, path); return; diff --git a/tests/regressions/rhbz1044014.sh b/tests/regressions/rhbz1044014.sh index c021ce1e0..f010f2ee2 100755 --- a/tests/regressions/rhbz1044014.sh +++ b/tests/regressions/rhbz1044014.sh @@ -52,7 +52,7 @@ grep "libvirt needs authentication to connect to libvirt UR...