search for: drive_serv

Displaying 16 results from an estimated 16 matches for "drive_serv".

Did you mean: drive_server
2013 Apr 05
3
[PATCH] Add support for SSH (Secure Shell) block device.
Note this patch requires a non-upstream qemu patch that I've been experimenting with. See qemu-devel list. Rich.
2014 Mar 12
3
Re: [PATCH v2 03/18] New API parameter: Add discard parameter to guestfs_add_drive_opts.
On Tuesday 11 March 2014 23:13:46 Richard W.M. Jones wrote: > diff --git a/src/drives.c b/src/drives.c > index 2c85b52..68e37f7 100644 > --- a/src/drives.c > +++ b/src/drives.c > @@ -115,7 +115,8 @@ static struct drive * > create_drive_file (guestfs_h *g, const char *path, > bool readonly, const char *format, > const char *iface,
2013 May 07
7
[PATCH 0/5] rbd improvements
This series improves ceph rbd support in libguestfs. It uses the servers list, adds support for a custom username, and starts to add support for custom secret.
2016 Dec 24
0
[PATCH] lib: Use a common function to validate strings.
...p;& c != ']') - return 0; - } - return 1; -} +#define VALID_HOSTNAME(str) \ + guestfs_int_string_is_valid ((str), 1, 255, true, true, "-.:[]") /** * Check the port number is reasonable. @@ -700,7 +657,7 @@ parse_one_server (guestfs_h *g, const char *server, struct drive_server *ret) return -1; } free (port_str); - if (!valid_hostname (hostname)) { + if (!VALID_HOSTNAME (hostname)) { error (g, _("invalid hostname '%s'"), hostname); free (hostname); return -1; @@ -711,7 +668,7 @@ parse_one_server (guestfs_h *g...
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.
2018 Jun 14
1
lib: Convert all drive socket parameters to an absolute path
One interesting omission is that we don't allow sockets in the abstract namespace. The API won't let you pass these sockets because they contain a '\0' character in the middle of the string. Therefore this patch doesn't need to deal with those. However we should in future allow that, probably using the '@' character to stand in for the NUL byte, as is used in a few
2015 Feb 02
1
RFC: Handle query strings for http and https (RHBZ#1092583)
...aunch-direct.c index e6ed54a..00f3190 100644 --- a/src/launch-direct.c +++ b/src/launch-direct.c @@ -1189,7 +1189,8 @@ qemu_escape_param (guestfs_h *g, const char *param) static char * make_uri (guestfs_h *g, const char *scheme, const char *user, const char *password, - struct drive_server *server, const char *path) + struct drive_server *server, const char *path, + const char *querystring) { xmlURI uri = { .scheme = (char *) scheme, .user = (char *) user }; @@ -1217,6 +1218,7 @@ make_uri (guestfs_h *g, const char *scheme, const char *user,...
2014 Jan 16
3
[PATCH 0/2] Don't use snapshot=on
QEMU upstream has broken snapshot=on ... again. These two patches stop using it entirely. Instead we run 'qemu-img create' to create overlay disks as required. Note that the libvirt and UML backends were already doing this: The libvirt backend because <transient/> has never worked, and the UML backend was running uml_mkcow because the UML-equivalent syntax of snapshot=on was
2018 Jun 15
1
[PATCH v2] lib: Convert all drive socket parameters to an absolute path (RHBZ#1588451).
.../drives.c @@ -28,6 +28,7 @@ #include <stdbool.h> #include <string.h> #include <unistd.h> +#include <limits.h> #include <netdb.h> #include <arpa/inet.h> #include <assert.h> @@ -645,7 +646,18 @@ parse_one_server (guestfs_h *g, const char *server, struct drive_server *ret) return -1; } ret->transport = drive_transport_unix; - ret->u.socket = safe_strdup (g, server+5); + + /* libvirt requires sockets to be specified as an absolute path + * (see RHBZ#1588451), and it's probably a good idea anyway to + * check the socket...
2014 Apr 30
3
[PATCH 2/2] Fix handling of passwords in URLs
...h-direct.c index bb06c9e..96ae180 100644 --- a/src/launch-direct.c +++ b/src/launch-direct.c @@ -1207,12 +1207,14 @@ qemu_escape_param (guestfs_h *g, const char *param) static char * make_uri (guestfs_h *g, const char *scheme, const char *user, + const char *password, struct drive_server *server, const char *path) { xmlURI uri = { .scheme = (char *) scheme, .user = (char *) user }; CLEANUP_FREE char *query = NULL; CLEANUP_FREE char *pathslash = NULL; + CLEANUP_FREE char *userauth = NULL; /* Need to add a leading '/' to URI paths since xml...
2016 May 18
2
[PATCH v2 0/2] lib: qemu: Memoize qemu feature detection.
v1 -> v2: - Rebase on top of Pino's version work. Two patches went upstream, these are the two remaining patches. Note the generation number is still inside the qemu.stat file. We could put it in the filename, I have no particular preference. Rich.
2020 Feb 11
2
[PATCH v2] lib: add support for disks with 4096 bytes sector size
...n 1; } +/** + * Check the block size is reasonable. It can't be other then 512 or 4096. + */ +static int +valid_blocksize (int blocksize) +{ + if (blocksize == 512 || blocksize == 4096) + return 1; + return 0; +} + static int parse_one_server (guestfs_h *g, const char *server, struct drive_server *ret) { @@ -767,6 +788,10 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename, optargs->bitmask & GUESTFS_ADD_DRIVE_OPTS_COPYONREAD_BITMASK ? optargs->copyonread : false; + data.blocksize = + optargs->bitmask & GUESTFS_ADD_DRIVE_OPTS_BLOCKSIZE_BITM...
2016 May 12
7
[PATCH 0/4] lib: qemu: Memoize qemu feature detection.
Doing qemu feature detection in the direct backend takes ~100ms because we need to run `qemu -help' and `qemu -devices ?', and each of those interacts with glibc's very slow link loader. Fixing the link loader is really hard. Instead memoize the output of those two commands. This patch series first separates all the code dealing with qemu into a separate module (src/qemu.c) and
2020 Feb 10
1
[PATCH] lib: allow to specify physical/logical block size for disks
...eck the block size is reasonable. It can't be other then 0, 512 or 4096. + */ +static int +valid_blocksize (int blocksize) +{ + if (blocksize == 0 || blocksize == 512 || blocksize == 4096) + return 1; + return 0; +} + static int parse_one_server (guestfs_h *g, const char *server, struct drive_server *ret) { @@ -767,6 +788,10 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename, optargs->bitmask & GUESTFS_ADD_DRIVE_OPTS_COPYONREAD_BITMASK ? optargs->copyonread : false; + data.blocksize = + optargs->bitmask & GUESTFS_ADD_DRIVE_OPTS_BLOCKSIZE_BITM...
2017 Apr 04
1
[PATCH] Use Unicode single quotes ‘’ in place of short single quoted strings throughout.
...;)) { - error (g, _("for device '/dev/null', format must be 'raw'")); + error (g, _("for device ‘/dev/null’, format must be ‘raw’")); return NULL; } } else { @@ -653,14 +653,14 @@ parse_one_server (guestfs_h *g, const char *server, struct drive_server *ret) if (match2 (g, server, re_hostname_port, &hostname, &port_str)) { if (sscanf (port_str, "%d", &port) != 1 || !valid_port (port)) { - error (g, _("invalid port number '%s'"), port_str); + error (g, _("invalid port number ‘%s’&q...
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers. These aren't valid for global names in C++. (http://stackoverflow.com/a/228797) These large but completely mechanical patches change the illegal identifiers to legal ones. Rich.