Displaying 14 results from an estimated 14 matches for "guestfs_impl_add_drive_opt".
Did you mean:
guestfs_impl_add_drive_opts
2015 Jul 01
2
Re: URI Handling Patch
Hi All,
Here's the latest patch. I think this should address the problem. The
query string is now only appended to the end of a URI in the HTTP and HTTPS
cases.
The add-uri test now passes, and 'make check' still passes.
-- Gabriel
2018 Aug 09
0
Using SPDK as QEMU's rootfs disk && A patch for libguestfs to support SPDK
...ring (enum
drive_protocol protocol)
case drive_protocol_sheepdog: return "sheepdog";
case drive_protocol_ssh: return "ssh";
case drive_protocol_tftp: return "tftp";
+ case drive_protocol_spdk: return "spdk";
}
abort ();
}
@@ -878,6 +918,11 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char
*filename,
drv = create_drive_curl (g, &data);
}
#endif /* DISABLED IN RHEL 7 */
+ else if (STREQ (protocol, "spdk")) {
+ data.protocol = drive_protocol_spdk;
+ data.iface = safe_strdup(g, "vhost-user-scsi-pci");
+ drv = create_d...
2020 Feb 24
3
*** buffer overflow detected *** accessing invalid FD in libguestfs
...t
../../../lib/launch-direct.c:89
#13 0x00007ffff47f0b44 in create_overlay (g=0x7fffbc008d60,
drv=0x7fffbc03a890) at ../../../lib/drives.c:87
#14 0x00007ffff47f0d7b in create_drive_file (g=g@entry=0x7fffbc008d60,
data=data@entry=0x7fffca7fb2a0) at ../../../lib/drives.c:119
#15 0x00007ffff47f1c55 in guestfs_impl_add_drive_opts
(g=g@entry=0x7fffbc008d60,
filename=<optimized out>,
filename@entry=0x7fffbc10d540
"/var/lib/nova/instances/5ca86029-d296-4261-9a67-908bdd6c4eab/disk",
optargs=optargs@entry=0x7fffca7fb420) at ../../../lib/drives.c:826
#16 0x00007ffff4784927 in guestfs_add_drive_opts_argv
(g=g@...
2016 Dec 24
0
[PATCH] lib: Use a common function to validate strings.
..._server *ret)
}
/* Doesn't match anything above, so assume it's a bare hostname. */
- if (!valid_hostname (server)) {
+ if (!VALID_HOSTNAME (server)) {
error (g, _("invalid hostname or server string '%s'"), server);
return -1;
}
@@ -814,19 +771,19 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename,
return -1;
}
- if (data.format && !valid_format_iface (data.format)) {
+ if (data.format && !VALID_FORMAT_IFACE (data.format)) {
error (g, _("%s parameter is empty or contains disallowed characters"),
"...
2020 Feb 11
2
[PATCH v2] lib: add support for disks with 4096 bytes sector size
...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_BITMASK
+ ? optargs->blocksize : 0;
+
if (data.readonl...
2020 Feb 10
0
Re: [RFC] lib: allow to specify physical/logical block size for disks
...drv->discard = data->discard;
> drv->copyonread = data->copyonread;
> + drv->pblocksize = data->pblocksize;
> + drv->lblocksize = data->lblocksize;
>
> if (data->readonly) {
> if (create_overlay (g, drv) == -1) {
> @@ -767,6 +773,14 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename,
> optargs->bitmask & GUESTFS_ADD_DRIVE_OPTS_COPYONREAD_BITMASK
> ? optargs->copyonread : false;
>
> + data.pblocksize =
> + optargs->bitmask & GUESTFS_ADD_DRIVE_OPTS_PBLOCKSIZE_BITMASK
> + ? optargs->pblo...
2020 Feb 10
1
[PATCH] lib: allow to specify physical/logical block size for disks
...39;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_BITMASK
+ ? optargs->blocksize : 0;
+
if (data.readonl...
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.
2020 Feb 07
8
[RFC] lib: allow to specify physical/logical block size for disks
...(g, data->cachemode) : NULL;
drv->discard = data->discard;
drv->copyonread = data->copyonread;
+ drv->pblocksize = data->pblocksize;
+ drv->lblocksize = data->lblocksize;
if (data->readonly) {
if (create_overlay (g, drv) == -1) {
@@ -767,6 +773,14 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename,
optargs->bitmask & GUESTFS_ADD_DRIVE_OPTS_COPYONREAD_BITMASK
? optargs->copyonread : false;
+ data.pblocksize =
+ optargs->bitmask & GUESTFS_ADD_DRIVE_OPTS_PBLOCKSIZE_BITMASK
+ ? optargs->pblocksize : 0;
+
+ data.lblocksi...
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.
2017 Apr 04
1
[PATCH] Use Unicode single quotes ‘’ in place of short single quoted strings throughout.
...anything above, so assume it's a bare hostname. */
if (!VALID_HOSTNAME (server)) {
- error (g, _("invalid hostname or server string '%s'"), server);
+ error (g, _("invalid hostname or server string ‘%s’"), server);
return -1;
}
@@ -755,7 +755,7 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename,
else if (STREQ (optargs->discard, "besteffort"))
data.discard = discard_besteffort;
else {
- error (g, _("discard parameter must be 'disable', 'enable' or 'besteffort'"));
+ error (g, _(&...
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
...lback callback)
{
struct cb_data data;
CLEANUP_CMD_CLOSE struct command *cmd = guestfs_int_new_command (g);
diff --git a/src/drives.c b/src/drives.c
index d957fc4..b9cc813 100644
--- a/src/drives.c
+++ b/src/drives.c
@@ -729,7 +729,7 @@ parse_servers (guestfs_h *g, char *const *strs,
int
guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename,
- const struct guestfs_add_drive_opts_argv *optargs)
+ const struct guestfs_add_drive_opts_argv *optargs)
{
struct drive_create_data data;
const char *protocol;
@@ -954,7 +954,7 @@ guestfs_impl_add_drive_ro (guestfs_h *g, c...
2015 Oct 05
3
[PATCH 1/2] Change 'fprintf (stdout,...)' -> printf.
Result of earlier copy and paste.
---
align/scan.c | 35 ++++++++++---------
cat/cat.c | 39 +++++++++++----------
cat/filesystems.c | 69 +++++++++++++++++++-------------------
cat/log.c | 35 ++++++++++---------
cat/ls.c | 61 +++++++++++++++++----------------
df/main.c | 43 ++++++++++++------------
diff/diff.c | 67
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.