search for: guestfs_int_drive_index

Displaying 12 results from an estimated 12 matches for "guestfs_int_drive_index".

2015 Jul 01
2
[PATCH v2 0/2] utils: Add guestfs_int_drive_index and unit test.
Since v1: - Test error cases in the unit test of guestfs_int_drive_index. Rich.
2015 Jul 01
1
[PATCH 1/2] utils: Add a test of the guestfs_int_drive_name function.
This function didn't have a unit test before. --- src/test-utils.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/test-utils.c b/src/test-utils.c index 8e1491f..c5e2f08 100644 --- a/src/test-utils.c +++ b/src/test-utils.c @@ -1,5 +1,5 @@ /* libguestfs - * Copyright (C) 2014 Red Hat Inc. + * Copyright (C) 2014-2015 Red Hat Inc. * *
2015 Jul 01
12
[PATCH 1/9] v2v: Stable bus and slot numbers for removable drives (RHBZ#1238053).
This patch series adds stable bus and slot numbers for removable drives (CDs and floppies) when the guest is converted using virt-v2v or virt-p2v. Previously we were a bit random about this. After this patch series, the bus and slot numbers and preserved if at all possible. BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1238053 Rich.
2016 Feb 04
0
[PATCH] aarch64: Use a common table of AAVMF paths.
...src/guestfs-internal-frontend.h index 2fbf875..6f54a73 100644 --- a/src/guestfs-internal-frontend.h +++ b/src/guestfs-internal-frontend.h @@ -107,6 +107,7 @@ extern int guestfs_int_random_string (char *ret, size_t len); extern char *guestfs_int_drive_name (size_t index, char *ret); extern ssize_t guestfs_int_drive_index (const char *); extern int guestfs_int_is_true (const char *str); +extern const char *guestfs_int_aavmf_firmware[]; /* These functions are used internally by the CLEANUP_* macros. * Don't call them directly. diff --git a/src/utils.c b/src/utils.c index 36fd458..9244d16 100644 --- a/src/ut...
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.
2020 Feb 20
0
[PATCH] daemon: Translate device names if Linux device ordering is unstable (RHBZ#1804207).
...rted numerically. */ + start = &device[5+len+1]; + len = strspn (start, "abcdefghijklmnopqrstuvwxyz"); + if (len >= sizeof dev - 1) { + fprintf (stderr, "unparseable device name: %s\n", device); + return NULL; + } + strcpy (dev, start); + + i = guestfs_int_drive_index (dev); + if (i >= 0 && i < (ssize_t) cache_size) { + /* Append the partition name if present. */ + if (asprintf (&ret, "%s%s", cache[i], start+len) == -1) + return NULL; + } + } + + /* If we didn't translate it above, continue with the same n...
2020 Mar 05
5
[PATCH v2 0/4] daemon: Translate device names if Linux device is unstable (RHBZ#1804207).
v1 was here: https://www.redhat.com/archives/libguestfs/2020-February/msg00220.html This patch series is a little bit better. It's still a bit of a hack. The _real_ fix for this is outlined in the TODO file (see patch 1) but that requires a lot more work than we could do before 1.42 is released, unless we delay 1.42 for a lot longer. I'm hoping with this to have something which works
2016 Dec 24
0
[PATCH] lib: Use a common function to validate strings.
...NTERNAL_FRONTEND_H_ +#include <stdbool.h> + #include "guestfs-internal-all.h" #define _(str) dgettext(PACKAGE, (str)) @@ -89,6 +91,7 @@ extern int guestfs_int_random_string (char *ret, size_t len); extern char *guestfs_int_drive_name (size_t index, char *ret); extern ssize_t guestfs_int_drive_index (const char *); extern int guestfs_int_is_true (const char *str); +extern bool guestfs_int_string_is_valid (const char *str, size_t min_length, size_t max_length, bool alpha, bool digit, const char *extra); //extern void guestfs_int_fadvise_normal (int fd); extern void guestfs_int_fadvise_sequen...
2016 Dec 24
2
[PATCH] lib: Use a common function to validate strings.
As discussed in the thread on validating $TERM, it would be good to have a common function to do this. This is such a function. The main advantage is it includes unit tests which the previous functions did not. Rich.
2017 Jan 25
0
[PATCH v2 2/7] lib: Move utilities to new directory common/utils.
...f --git a/v2v/input_libvirtxml.ml b/v2v/input_libvirtxml.ml index f2866aa..b19ac79 100644 --- a/v2v/input_libvirtxml.ml +++ b/v2v/input_libvirtxml.ml @@ -35,7 +35,7 @@ and parsed_source = | P_dont_rewrite (* Turn string like "hda" into controller slot number. See also - * src/utils.c:guestfs_int_drive_index which this function calls. + * common/utils/utils.c:guestfs_int_drive_index which this function calls. *) let get_drive_slot str offset = let len = String.length str in diff --git a/v2v/test-harness/Makefile.am b/v2v/test-harness/Makefile.am index 1a1a1a7..e2ba15c 100644 --- a/v2v/test-harnes...
2017 Jan 20
5
[PATCH 0/5] Rename src/ to lib/ and move common code to common/
This patch series moves some files and directories around but is only code motion (or supposed to be). A new directory, common/, is created for all of the common code which is currently shared in random ways between parts of the project. And src/ becomes lib/ (the largest change, but mostly mechanical). In full this series makes the following changes: src/libprotocol -> common/protocol
2017 Jan 25
10
[PATCH v2 0/7] Rename src/ to lib/ and move common code to common/
Previous patch series was posted here: https://www.redhat.com/archives/libguestfs/2017-January/msg00059.html v2 simply extends this patch series to cover the extra directories common/edit, common/progress, common/windows and common/parallel. The only remaining item is to consider whether we should rename mllib to something else, mlcommon was my suggestion. Rich.