search for: add_drives_handle

Displaying 20 results from an estimated 20 matches for "add_drives_handle".

2017 Apr 28
2
[PATCH] common/options: Change drv struct to store drive index instead of device name.
...1,6 @@ option_d (const char *arg, struct drv **drvsp) error (EXIT_FAILURE, errno, "calloc"); drv->type = drv_d; - drv->nr_drives = -1; 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...
2017 May 03
0
Re: [PATCH] common/options: Change drv struct to store drive index instead of device name.
.../* Add domains/drives from the command line (for a single guest). */ > - add_drives (drvs, 'a'); > + add_drives (drvs, 0); This, and in all the other files, is using 0 as starting index. Since add_drives is a macro, I'd remove its 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...
2020 Feb 24
3
[PATCH commit] options: Compile blocksize code conditionally.
...here. Thanks: Pino Toscano Fixes: commit c33e0036c70ce68d40df92e4a6c0423e136e005c --- options/options.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/options/options.c b/options/options.c index 63221ea..abdcbae 100644 --- a/options/options.c +++ b/options/options.c @@ -140,10 +140,12 @@ add_drives_handle (guestfs_h *g, struct drv *drv, size_t drive_index) ad_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_DISCARD_BITMASK; ad_optargs.discard = drv->a.discard; } +#ifdef GUESTFS_ADD_DRIVE_OPTS_BLOCKSIZE_BITMASK if (drv->a.blocksize) { ad_optargs.bitmask |= GUES...
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
...ocol); } @@ -82,6 +84,7 @@ option_a (const char *arg, const char *format, struct drv **drvsp) drv->uri.password = uri.password; drv->uri.format = format; drv->uri.orig_uri = arg; + drv->uri.blocksize = blocksize; } drv->next = *drvsp; @@ -137,6 +140,10 @@ add_drives_handle (guestfs_h *g, struct drv *drv, size_t drive_index) ad_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...
2020 Feb 11
1
[common PATCH] options: add '--blocksize' option for C-based tools
...ocol); } @@ -82,6 +84,7 @@ option_a (const char *arg, const char *format, struct drv **drvsp) drv->uri.password = uri.password; drv->uri.format = format; drv->uri.orig_uri = arg; + drv->uri.blocksize = blocksize; } drv->next = *drvsp; @@ -137,6 +140,10 @@ add_drives_handle (guestfs_h *g, struct drv *drv, size_t drive_index) ad_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...
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:
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
2020 Feb 25
0
Re: [PATCH commit] options: Compile blocksize code conditionally.
...3e0036c70ce68d40df92e4a6c0423e136e005c > --- > options/options.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/options/options.c b/options/options.c > index 63221ea..abdcbae 100644 > --- a/options/options.c > +++ b/options/options.c > @@ -140,10 +140,12 @@ add_drives_handle (guestfs_h *g, struct drv *drv, size_t drive_index) > ad_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_DISCARD_BITMASK; > ad_optargs.discard = drv->a.discard; > } > +#ifdef GUESTFS_ADD_DRIVE_OPTS_BLOCKSIZE_BITMASK > if (drv->a.blocksize) { >...
2020 Mar 10
2
[PATCH common] options: Require libguestfs >= 1.42.
...dif CLEANUP_FREE_STRING_LIST char **keys = get_keys (ks, partitions[i], uuid); assert (guestfs_int_count_strings (keys) > 0); diff --git a/options/options.c b/options/options.c index abdcbae5b..63221ea32 100644 --- a/options/options.c +++ b/options/options.c @@ -140,12 +140,10 @@ add_drives_handle (guestfs_h *g, struct drv *drv, size_t drive_index) ad_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_DISCARD_BITMASK; ad_optargs.discard = drv->a.discard; } -#ifdef GUESTFS_ADD_DRIVE_OPTS_BLOCKSIZE_BITMASK if (drv->a.blocksize) { ad_optargs.bitmask |= GUES...
2014 Apr 30
3
[PATCH 2/2] Fix handling of passwords in URLs
...g, const char *format, struct drv **drvsp) drv->uri.protocol = uri.protocol; drv->uri.server = uri.server; drv->uri.username = uri.username; + drv->uri.password = uri.password; drv->uri.format = format; drv->uri.orig_uri = arg; } @@ -167,6 +168,10 @@ add_drives_handle (guestfs_h *g, struct drv *drv, char next_drive) ad_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...
2015 Feb 02
1
RFC: Handle query strings for http and https (RHBZ#1092583)
...ar *arg, const char *format, struct drv **drvsp) drv->uri.server = uri.server; drv->uri.username = uri.username; drv->uri.password = uri.password; + drv->uri.query = uri.query; drv->uri.format = format; drv->uri.orig_uri = arg; } @@ -172,6 +173,10 @@ add_drives_handle (guestfs_h *g, struct drv *drv, char next_drive) ad_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_SECRET_BITMASK; ad_optargs.secret = drv->uri.password; } + if (drv->uri.query) { + ad_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_QUERYSTRING_BITMASK; + ad_o...
2014 Nov 26
5
[PATCH] tools: implement --short-options
...;& STRNEQ (long_options->name, "short-options")) printf ("--%s\n", long_options->name); long_options++; } diff --git a/fish/options.h b/fish/options.h index 2c568e6..cf68122 100644 --- a/fish/options.h +++ b/fish/options.h @@ -138,6 +138,7 @@ extern char add_drives_handle (guestfs_h *g, struct drv *drv, char next_drive); extern void mount_mps (struct mp *mp); extern void free_drives (struct drv *drv); extern void free_mps (struct mp *mp); +extern void display_short_options (const char *) __attribute__((noreturn)); extern void display_long_options (const struct o...
2016 Aug 25
7
[PATCH 0/5] bash completion: Add missing bash completion scripts (RHBZ#1367738).
This implements most of RHBZ#1367738. I didn't bother with virt-v2v-copy-to-local and virt-win-reg, but all the other tools now have full bash completion. Rich.
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
2014 Mar 12
12
[PATCH v3 00/10] Add discard support.
This set of patches: - Adds new APIs to support discard in libguestfs. - Adds discard support to virt-format. - Adds discard support to virt-sysprep. - Implements virt-sparsify --in-place. This is now working, after fixing the rather stupid bug in fstrim. I've pushed the ones which were ACKed previously + the fstrim fix. Rich.
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.
2014 Mar 11
21
[PATCH v2 00/18] Add discard support.
This still isn't working at the moment. See: http://marc.info/?t=139457409300003&r=1&w=2 This set of patches: - Adds new APIs to support discard in libguestfs. - Adds discard support to virt-format. - Adds discard support to virt-sysprep. - Implements virt-sparsify --in-place. Rich.
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
...drv **drvsp) struct drv *drv; drv = calloc (1, sizeof (struct drv)); - if (!drv) { - perror ("calloc"); - exit (EXIT_FAILURE); - } + if (!drv) + error (EXIT_FAILURE, errno, "calloc"); drv->type = drv_d; drv->nr_drives = -1; @@ -115,10 +110,8 @@ add_drives_handle (guestfs_h *g, struct drv *drv, char next_drive) free (drv->device); drv->device = NULL; - if (asprintf (&drv->device, "/dev/sd%c", next_drive) == -1) { - perror ("asprintf"); - exit (EXIT_FAILURE); - } + if (asprintf (&drv->dev...
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.