search for: guestfs_device_index

Displaying 20 results from an estimated 29 matches for "guestfs_device_index".

2020 Feb 20
1
[PATCH] lib: Move guestfs_device_index impl from daemon to library.
Although the commit message ties this to https://bugzilla.redhat.com/1804207, in fact I believe this commit could be applied independently. It's a simple optimization. Rich.
2014 Dec 09
0
[PATCH] inspection: Not an installer if there are multiple partitions (RHBZ#1171666).
...eturn ret; } - -static int -is_partition (guestfs_h *g, const char *partition) -{ - CLEANUP_FREE char *device = NULL; - - guestfs_push_error_handler (g, NULL, NULL); - - if ((device = guestfs_part_to_dev (g, partition)) == NULL) { - guestfs_pop_error_handler (g); - return 0; - } - - if (guestfs_device_index (g, device) == -1) { - guestfs_pop_error_handler (g); - return 0; - } - - guestfs_pop_error_handler (g); - - return 1; -} diff --git a/src/inspect-fs.c b/src/inspect-fs.c index e9cc2e9..7b116db 100644 --- a/src/inspect-fs.c +++ b/src/inspect-fs.c @@ -48,6 +48,7 @@ static int check_filesyst...
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.
2012 Jul 04
1
NOTICE: Data corruption bug when writing to qcow2 files
As you might have seen for the past 3 days I've been tackling a nasty data corruption bug[1][2]. The bug occurs when ALL of the following conditions are true: (a) You are using a qcow2 image file. (b) You are writing out data to the image file using libguestfs or a libguestfs-using tool like guestfish or virt-resize. (c) The data is not being written to a filesystem (to files or
2020 Mar 10
2
ANNOUNCE: libguestfs 1.42 - tools for accessing and modifying virtual machine disk images
...that we currently use, "ocaml-augeas" (Pino Toscano). Fix compatibility issues when being compiled with GCC 10. Internals When linking OCaml programs, automake silent rules and the "V=1" flag are both now obeyed (Pino Toscano). The "guestfs_device_index" API was reimplemented in library code instead of in the daemon. There should be no observable effect of this change. Since Linux 5.6 enumerates "/dev/sdX" devices in parallel, libguestfs was changed to map API device names to appliance device names, and...
2017 Apr 20
1
[PATCH] tests: Replace test-max-disks with several tests.
..."%s: incorrect device name at index %zu: " + "%s (expected suffix %s)\n", + getprogname (), i, devices[i], expected); + exit (EXIT_FAILURE); + } + } + + /* Check drive index. */ + for (i = 0; i < ndisks; ++i) { + int idx; + + idx = guestfs_device_index (g, devices[i]); + if (idx == -1) + exit (EXIT_FAILURE); + if ((int) i != idx) { + fprintf (stderr, + "%s: incorrect device index for %s: " + "expected %zu by got %d\n", + getprogname (), devices[i], i, idx); + exit...
2014 Oct 05
0
[PATCH v5 2/7] tests/c-api: Convert the C API tests to use the test harness.
...uot;base64_in"; "$datadir/hello.b64"; "/base64_in"]; ["cat"; "/base64_in"]], "hello\n"), [] ]; shortdesc = "upload base64-encoded data to file"; @@ -8850,9 +8854,9 @@ See also C<guestfs_part_to_partnum>, C<guestfs_device_index>." }; proc_nr = Some 273; progress = true; cancellable = true; tests = - (let md5 = Digest.to_hex (Digest.file "COPYING.LIB") in [ + (let md5 = Digest.to_hex (Digest.file "COPYING") in [ InitScratchFS, Always, TestResultString ( -...
2015 Aug 06
0
[PATCH v4 02/17] tests/c-api: Convert the C API tests to use the test harness.
...uot;base64_in"; "$datadir/hello.b64"; "/base64_in"]; ["cat"; "/base64_in"]], "hello\n"), [] ]; shortdesc = "upload base64-encoded data to file"; @@ -8993,9 +8997,9 @@ See also C<guestfs_part_to_partnum>, C<guestfs_device_index>." }; proc_nr = Some 273; progress = true; cancellable = true; tests = - (let md5 = Digest.to_hex (Digest.file "COPYING.LIB") in [ + (let md5 = Digest.to_hex (Digest.file "COPYING") in [ InitScratchFS, Always, TestResultString ( -...
2013 Jan 25
4
[PATCH 0/3] Use __attribute__((cleanup(...)))
This patch series changes a small part of the library to use __attribute__((cleanup(...))) to automatically free memory when pointers go out of the current scope. In general terms this seems to be a small win although you do have to use it carefully. For functions where you can completely get rid of the "exit code paths", it can simplify things. For a good example, see the
2017 Feb 21
1
[PATCH] generator: Put all the daemon procedure numbers (proc_nr)
This is a follow-up to the other generator changes in: https://www.redhat.com/archives/libguestfs/2017-February/msg00217.html Rich.
2015 Jun 14
2
[PATCH] pod: Use F<> for filenames instead of C<>.
...ions and block devices (eg. C</dev/sda>) cannot be used as the +partitions and block devices (eg. F</dev/sda>) cannot be used as the C<path> parameter of this call. See also C<guestfs_stat>." }; @@ -8968,15 +8968,15 @@ See also C<guestfs_part_to_partnum>, C<guestfs_device_index>." }; ]); shortdesc = "upload a file from the local machine with offset"; longdesc = "\ -Upload local file C<filename> to C<remotefilename> on the +Upload local file F<filename> to F<remotefilename> on the filesystem. -C<remotefi...
2017 Apr 21
0
[PATCH 1/2] generator: Simplify the handling of string parameters.
...e = RString "device", [String (Device, "partition")], []; tests = [ InitPartition, Always, TestResultDevice ( [["part_to_dev"; "/dev/sda1"]], "/dev/sda"), []; @@ -6103,7 +6103,7 @@ See also C<guestfs_part_to_partnum>, C<guestfs_device_index>." }; { defaults with name = "upload_offset"; added = (1, 5, 17); - style = RErr, [FileIn "filename"; Dev_or_Path "remotefilename"; Int64 "offset"], []; + style = RErr, [String (FileIn, "filename"); String (Dev_or_Path, &quot...
2017 Apr 21
4
[PATCH 0/2] generator: Simplify the handling of string parameters.
Very large but mechanical change to the generator. Rich.
2014 Oct 04
4
[PATCH v4 0/4] tests: Introduce test harness for running tests.
This converts more of the tests (basically everything under tests/) to use the test harness, revealing some problems which have subsequently been fixed. Rich.
2014 Oct 05
12
[PATCH v5 0/7] tests: Introduce test harness for running tests.
Since v4: - More tests have been converted. - Testing local guests fixed. - Drop no-exec-stack test.
2014 Oct 23
10
[PATCH v6 00/10] tests: Introduce test harness for running tests.
For v6: This is mainly just a rebase, but I have also added tests in the ocaml/ language bindings directory, and for all the OCaml-written virt tools. Rich.
2014 Oct 24
10
[PATCH v7 00/10] tests: Introduce test harness for running tests.
v7: The only changes since v6 are those suggested by Pino in the review of v5.
2015 Jul 28
10
[PATCH 00/10] tests: Introduce test harness for running tests.
I should probably start by saying this patch series isn't ready for review yet. This patch series adds a test harness to libguestfs. It allows us to run the tests outside the ordinary 'make check' path in the build tree. In particular, you can use this to run tests when libguestfs has been installed. 'make check' and the other 'make check-*' rules still work. The
2015 Aug 06
20
[PATCH v4 00/17] tests: Introduce test harness for running tests.
Since v3: - A large number of fixes, especially for running the tests on installed libguestfs. - Fixed EXTRA_DIST rules throughout. - Extra patch 17/17 which is a tidy-up of the generated XML listing guests. Rich.
2017 Jul 21
10
[PATCH v10 00/10] Reimplement inspection in the daemon.
v9 was here: https://www.redhat.com/archives/libguestfs/2017-July/msg00139.html This depends on these three series (the first two being single minor patches): https://www.redhat.com/archives/libguestfs/2017-July/msg00207.html https://www.redhat.com/archives/libguestfs/2017-July/msg00209.html https://www.redhat.com/archives/libguestfs/2017-July/msg00215.html There is no substantive change. I