search for: guestfs_add_drive_opts_argv

Displaying 20 results from an estimated 32 matches for "guestfs_add_drive_opts_argv".

2020 Feb 24
3
[PATCH commit] options: Compile blocksize code conditionally.
...K; ad_optargs.discard = drv->a.discard; } +#ifdef GUESTFS_ADD_DRIVE_OPTS_BLOCKSIZE_BITMASK if (drv->a.blocksize) { ad_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_BLOCKSIZE_BITMASK; ad_optargs.blocksize = drv->a.blocksize; } +#endif r = guestfs_add_drive_opts_argv (g, drv->a.filename, &ad_optargs); if (r == -1) @@ -177,10 +179,12 @@ add_drives_handle (guestfs_h *g, struct drv *drv, size_t drive_index) ad_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_SECRET_BITMASK; ad_optargs.secret = drv->uri.password; } +#ifdef GUESTFS...
2020 Feb 25
0
Re: [PATCH commit] options: Compile blocksize code conditionally.
...discard; > } > +#ifdef GUESTFS_ADD_DRIVE_OPTS_BLOCKSIZE_BITMASK > if (drv->a.blocksize) { > ad_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_BLOCKSIZE_BITMASK; > ad_optargs.blocksize = drv->a.blocksize; > } > +#endif > > r = guestfs_add_drive_opts_argv (g, drv->a.filename, &ad_optargs); > if (r == -1) > @@ -177,10 +179,12 @@ add_drives_handle (guestfs_h *g, struct drv *drv, size_t drive_index) > ad_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_SECRET_BITMASK; > ad_optargs.secret = drv->uri.password; >...
2020 Mar 10
2
[PATCH common] options: Require libguestfs >= 1.42.
...K; ad_optargs.discard = drv->a.discard; } -#ifdef GUESTFS_ADD_DRIVE_OPTS_BLOCKSIZE_BITMASK if (drv->a.blocksize) { ad_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_BLOCKSIZE_BITMASK; ad_optargs.blocksize = drv->a.blocksize; } -#endif r = guestfs_add_drive_opts_argv (g, drv->a.filename, &ad_optargs); if (r == -1) @@ -179,12 +177,10 @@ add_drives_handle (guestfs_h *g, struct drv *drv, size_t drive_index) ad_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_SECRET_BITMASK; ad_optargs.secret = drv->uri.password; } -#ifdef GUESTFS...
2012 Jan 09
3
[PATCH 1/3] launch: move the filename checking to a wrapper
...t char *filename) +{ + if (strchr (filename, ',') != NULL) { + error (g, _("filename cannot contain ',' (comma) character")); + return 1; + } + return 0; +} + int guestfs__add_drive_opts (guestfs_h *g, const char *filename, const struct guestfs_add_drive_opts_argv *optargs) @@ -287,10 +297,8 @@ guestfs__add_drive_opts (guestfs_h *g, const char *filename, char *name; int use_cache_off; - if (strchr (filename, ',') != NULL) { - error (g, _("filename cannot contain ',' (comma) character")); + if (check_path(g, filename))...
2020 Feb 13
1
[common PATCH v4 0/1] options: add '--blocksize' option for C-based tools
From: Nikolay Ivanets <stenavin@gmail.com> v4 fixes issues found during code review: - whitespace-change-only hunks are removed - options are alphabetically orderred now v3 is just a spelling correction spotted by Eric Blake https://www.redhat.com/archives/libguestfs/2020-February/msg00111.html In v2 I've moved '--blocksize' parameter description into the separate file called
2020 Feb 12
0
[common PATCH v2 1/1] options: add '--blocksize' option for C-based tools
..._optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_DISCARD_BITMASK; ad_optargs.discard = drv->a.discard; } + if (drv->a.blocksize) { + ad_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_BLOCKSIZE_BITMASK; + ad_optargs.blocksize = drv->a.blocksize; + } r = guestfs_add_drive_opts_argv (g, drv->a.filename, &ad_optargs); if (r == -1) @@ -170,6 +177,10 @@ add_drives_handle (guestfs_h *g, struct drv *drv, size_t drive_index) ad_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_SECRET_BITMASK; ad_optargs.secret = drv->uri.password; } + if (drv-&...
2020 Feb 11
1
[common PATCH] options: add '--blocksize' option for C-based tools
..._optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_DISCARD_BITMASK; ad_optargs.discard = drv->a.discard; } + if (drv->a.blocksize) { + ad_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_BLOCKSIZE_BITMASK; + ad_optargs.blocksize = drv->a.blocksize; + } r = guestfs_add_drive_opts_argv (g, drv->a.filename, &ad_optargs); if (r == -1) @@ -170,6 +177,10 @@ add_drives_handle (guestfs_h *g, struct drv *drv, size_t drive_index) ad_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_SECRET_BITMASK; ad_optargs.secret = drv->uri.password; } + if (drv-&...
2020 Feb 12
1
[common PATCH v3 0/1] options: add '--blocksize' option for C-based tools
From: Nikolay Ivanets <stenavin@gmail.com> v3 is just a spelling correction spotted by Eric Blake In v2 I've moved '--blocksize' parameter description into the separate file called blocksize-option.pod so we can include it everywhere we need similar to key-option.pod. https://www.redhat.com/archives/libguestfs/2020-February/msg00099.html v1 was here:
2017 Apr 28
2
[PATCH] common/options: Change drv struct to store drive index instead of device name.
...drv->d.guest = optarg; drv->next = *drvsp; @@ -111,22 +108,15 @@ option_d (const char *arg, struct drv **drvsp) } char -add_drives_handle (guestfs_h *g, struct drv *drv, char next_drive) +add_drives_handle (guestfs_h *g, struct drv *drv, size_t drive_index) { int r; struct guestfs_add_drive_opts_argv ad_optargs; - if (next_drive > 'z') - error (EXIT_FAILURE, 0, _("too many drives added on the command line")); - if (drv) { - next_drive = add_drives (drv->next, next_drive); + drive_index = add_drives (drv->next, drive_index); - free (drv->device);...
2020 Feb 12
3
[common PATCH v2 0/1] options: add '--blocksize' option for C-based tools
From: Nikolay Ivanets <stenavin@gmail.com> In v2 I've moved '--blocksize' parameter description into the separate file called blocksize-option.pod so we can include it everywhere we need similar to key-option.pod. v1 was here: https://www.redhat.com/archives/libguestfs/2020-February/msg00096.html Nikolay Ivanets (1): options: add '--blocksize' option for C-based
2016 Oct 31
1
API/ABI changes tracker for libguestfs
Hello, The API/ABI interface of the libguestfs library is now checked for backward compatibility in the Upstream Tracker project: https://abi-laboratory.pro/tracker/timeline/libguestfs/ Hope the report will be helpful for users and maintainers of the library. Thank you.
2017 May 03
0
Re: [PATCH] common/options: Change drv struct to store drive index instead of device name.
...s drive_index parameter, and always pass 0 to add_drives_handle. The only change needed would be... > char > -add_drives_handle (guestfs_h *g, struct drv *drv, char next_drive) > +add_drives_handle (guestfs_h *g, struct drv *drv, size_t drive_index) > { > int r; > struct guestfs_add_drive_opts_argv ad_optargs; > > - if (next_drive > 'z') > - error (EXIT_FAILURE, 0, _("too many drives added on the command line")); > - > if (drv) { > - next_drive = add_drives (drv->next, next_drive); > + drive_index = add_drives (drv->next, drive_in...
2020 Apr 29
0
golang: panic: runtime error: cgo argument has Go pointer to Go pointer
...40 +0x1b2 main.OpenImage(0x7ffd4b5d67ff, 0xd, 0x0, 0x0, 0x42110b, 0x7c87e0, 0x4f41e0) /opt/gopath/src/disk/disk.go:34 +0x371 main.resizeext4(0x7ffd4b5d67ff, 0xd, 0x0, 0x0) /opt/gopath/src/disk/disk.go:677 +0x60 main.main() /opt/gopath/src/disk/disk.go:970 +0x5e5 i found struct in guestfs.h struct guestfs_add_drive_opts_argv { ... char *const *server; ... } so i make a daemon to test. has the same error. how could i to use libguestfs to connect ceph rbd use golang interface. package main /* #include <stdio.h> #include <string.h> struct t_server { const char *protocol; char *const *addr; }; voi...
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.
2016 Nov 16
0
[PATCH 2/2] libvirt: read secrets of disks (RHBZ#1392798)
...make local changes: */ @@ -382,6 +388,10 @@ add_disk (guestfs_h *g, optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_USERNAME_BITMASK; optargs.username = username; } + if (secret) { + optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_SECRET_BITMASK; + optargs.secret = secret; + } return guestfs_add_drive_opts_argv (g, filename, &optargs); } @@ -475,7 +485,7 @@ for_each_disk (guestfs_h *g, const char *filename, const char *format, int readonly, const char *protocol, char *const *server, - const char *use...
2020 Feb 24
3
*** buffer overflow detected *** accessing invalid FD in libguestfs
...c55 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@entry=0x7fffbc008d60, filename=filename@entry=0x7fffbc10d540 "/var/lib/nova/instances/5ca86029-d296-4261-9a67-908bdd6c4eab/disk", optargs=optargs@entry=0x7fffca7fb420) at ../../../lib/actions-2.c:180 #17 0x00007ffff48128e0 in add_disk (g=g@entry=0x7fffbc008d60, filename=0x7fffbc...
2016 Nov 16
3
[PATCH 1/2] libvirt: un-duplicate XPath code
Move the checks for empty xmlXPathObjectPtr, and for extracting the result string out of it, to a new helper functions. This is just code motion, there should be no behaviour changes. --- src/libvirt-domain.c | 122 +++++++++++++++++++++------------------------------ 1 file changed, 50 insertions(+), 72 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 4d4142d..baab307
2012 Apr 12
5
[PATCH 0/4] libguestfs cannot open disk images which are symlinks to files that contain ':' (colon) character (RHBZ#812092).
Note: This is a regression in RHEL 6.3. Please review this patch urgently. The description of the bug is here: https://bugzilla.redhat.com/show_bug.cgi?id=812092 This patch set attempts to fix the problem conservatively, because it's a very high risk codepath and very late in the development of RHEL 6.3. The first patch reverts the behaviour of calling realpath(3) and checking for
2014 Apr 30
3
[PATCH 2/2] Fix handling of passwords in URLs
...optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_USERNAME_BITMASK; ad_optargs.username = drv->uri.username; } + if (drv->uri.password) { + ad_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_SECRET_BITMASK; + ad_optargs.secret = drv->uri.password; + } r = guestfs_add_drive_opts_argv (g, drv->uri.path, &ad_optargs); if (r == -1) @@ -290,6 +295,7 @@ free_drives (struct drv *drv) free (drv->uri.protocol); guestfs___free_string_list (drv->uri.server); free (drv->uri.username); + free (drv->uri.password); break; case drv_d: /...
2020 Feb 20
0
buffer overflow detected in collectd using libguestfs
...lib/x86_64-linux-gnu/libguestfs.so.0 #12 0x00007ffff47f0b44 in ?? () from /usr/lib/x86_64-linux-gnu/libguestfs.so.0 #13 0x00007ffff47f0d7b in ?? () from /usr/lib/x86_64-linux-gnu/libguestfs.so.0 #14 0x00007ffff47f1c55 in ?? () from /usr/lib/x86_64-linux-gnu/libguestfs.so.0 #15 0x00007ffff4784927 in guestfs_add_drive_opts_argv () from /usr/lib/x86_64-linux-gnu/libguestfs.so.0 #16 0x00007ffff48128e0 in ?? () from /usr/lib/x86_64-linux-gnu/libguestfs.so.0 #17 0x00007ffff4813cd6 in ?? () from /usr/lib/x86_64-linux-gnu/libguestfs.so.0 #18 0x00007ffff47ab2c3 in guestfs_add_libvirt_dom_argv () from /usr/lib/x86_64-linux-gnu/li...