search for: disk_create_qcow2

Displaying 19 results from an estimated 19 matches for "disk_create_qcow2".

2018 Aug 22
1
[PATCH] lib: create: avoid one extra string allocation
...anged, 11 insertions(+), 14 deletions(-) diff --git a/lib/create.c b/lib/create.c index 60e467fb6..fcc5855e0 100644 --- a/lib/create.c +++ b/lib/create.c @@ -250,11 +250,10 @@ is_power_of_2 (unsigned v) VALID_FLAG_ALPHA|VALID_FLAG_DIGIT, "") static int -disk_create_qcow2 (guestfs_h *g, const char *orig_filename, int64_t size, +disk_create_qcow2 (guestfs_h *g, const char *filename, int64_t size, const char *backingfile, const struct guestfs_disk_create_argv *optargs) { - CLEANUP_FREE char *filename = NULL; const char *bac...
2020 Feb 06
3
[PATCH] lib: Autodetect backing format and specify it explicitly.
...hat as the backing format in the overlay disk itself, allowing libvirt to open the disk later. --- lib/create.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/create.c b/lib/create.c index e2a59b88d..e30286c39 100644 --- a/lib/create.c +++ b/lib/create.c @@ -255,6 +255,7 @@ disk_create_qcow2 (guestfs_h *g, const char *filename, int64_t size, const struct guestfs_disk_create_argv *optargs) { const char *backingformat = NULL; + CLEANUP_FREE char *backingformat_free = NULL; const char *preallocation = NULL; const char *compat = NULL; int clustersize = -1;...
2020 Mar 09
3
Re: [PATCH] lib: Autodetect backing format and specify it explicitly.
...ter. > > --- > > lib/create.c | 13 +++++++++++++ > > 1 file changed, 13 insertions(+) > > > > diff --git a/lib/create.c b/lib/create.c > > index e2a59b88d..e30286c39 100644 > > --- a/lib/create.c > > +++ b/lib/create.c > > @@ -255,6 +255,7 @@ disk_create_qcow2 (guestfs_h *g, const char *filename, int64_t size, > > const struct guestfs_disk_create_argv *optargs) > > { > > const char *backingformat = NULL; > > + CLEANUP_FREE char *backingformat_free = NULL; > > const char *preallocation = NULL; >...
2020 Mar 09
2
Re: [PATCH] lib: Autodetect backing format and specify it explicitly.
...; > > 1 file changed, 13 insertions(+) > > > > > > > > diff --git a/lib/create.c b/lib/create.c > > > > index e2a59b88d..e30286c39 100644 > > > > --- a/lib/create.c > > > > +++ b/lib/create.c > > > > @@ -255,6 +255,7 @@ disk_create_qcow2 (guestfs_h *g, const char *filename, int64_t size, > > > > const struct guestfs_disk_create_argv *optargs) > > > > { > > > > const char *backingformat = NULL; > > > > + CLEANUP_FREE char *backingformat_free = NULL; > > &...
2017 Jun 08
1
[PATCH] lib: create: Allow any [[:alnum:]]+ string as a backingfmt parameter.
...backing format. Allow any C<^[[:alnum]]+$> + * (in C locale), but limit the length to something reasonable. + */ +#define VALID_FORMAT(format) \ + guestfs_int_string_is_valid ((format), 1, 16, \ + VALID_FLAG_ALPHA|VALID_FLAG_DIGIT, "") + static int disk_create_qcow2 (guestfs_h *g, const char *orig_filename, int64_t size, const char *backingfile, @@ -267,12 +275,7 @@ disk_create_qcow2 (guestfs_h *g, const char *orig_filename, int64_t size, if (optargs->bitmask & GUESTFS_DISK_CREATE_BACKINGFORMAT_BITMASK) { backingformat = op...
2017 Jun 25
0
Re: [PATCH 1/2] launch: add support for autodetection of appliance image format
...ib/launch-direct.c | 2 ++ > lib/launch-libvirt.c | 15 +++++++++------ > 4 files changed, 16 insertions(+), 8 deletions(-) > > diff --git a/lib/create.c b/lib/create.c > index bd4c32ef7..aedfe8670 100644 > --- a/lib/create.c > +++ b/lib/create.c > @@ -272,7 +272,8 @@ disk_create_qcow2 (guestfs_h *g, const char *orig_filename, int64_t size, > */ > if (STRNEQ (backingformat, "raw") && > STRNEQ (backingformat, "qcow2") && > - STRNEQ (backingformat, "vmdk")) { > + STRNEQ (backingformat, &q...
2020 Mar 09
0
Re: [PATCH] lib: Autodetect backing format and specify it explicitly.
...itself, allowing libvirt to open the disk later. > --- > lib/create.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/lib/create.c b/lib/create.c > index e2a59b88d..e30286c39 100644 > --- a/lib/create.c > +++ b/lib/create.c > @@ -255,6 +255,7 @@ disk_create_qcow2 (guestfs_h *g, const char *filename, int64_t size, > const struct guestfs_disk_create_argv *optargs) > { > const char *backingformat = NULL; > + CLEANUP_FREE char *backingformat_free = NULL; > const char *preallocation = NULL; > const char *compat =...
2020 Mar 09
0
Re: [PATCH] lib: Autodetect backing format and specify it explicitly.
...reate.c | 13 +++++++++++++ > > > 1 file changed, 13 insertions(+) > > > > > > diff --git a/lib/create.c b/lib/create.c > > > index e2a59b88d..e30286c39 100644 > > > --- a/lib/create.c > > > +++ b/lib/create.c > > > @@ -255,6 +255,7 @@ disk_create_qcow2 (guestfs_h *g, const char *filename, int64_t size, > > > const struct guestfs_disk_create_argv *optargs) > > > { > > > const char *backingformat = NULL; > > > + CLEANUP_FREE char *backingformat_free = NULL; > > > const char *p...
2020 Mar 09
0
Re: [PATCH] lib: Autodetect backing format and specify it explicitly.
...3 insertions(+) > > > > > > > > > > diff --git a/lib/create.c b/lib/create.c > > > > > index e2a59b88d..e30286c39 100644 > > > > > --- a/lib/create.c > > > > > +++ b/lib/create.c > > > > > @@ -255,6 +255,7 @@ disk_create_qcow2 (guestfs_h *g, const char *filename, int64_t size, > > > > > const struct guestfs_disk_create_argv *optargs) > > > > > { > > > > > const char *backingformat = NULL; > > > > > + CLEANUP_FREE char *backingformat_free...
2017 Oct 06
2
[PATCH] lib: Pick up qemu-img path at build time.
...emu-img info "); + * guestfs_int_cmd_add_string_unquoted (cmd, "file info "); * guestfs_int_cmd_add_string_quoted (cmd, filename); * * =item 4. diff --git a/lib/create.c b/lib/create.c index fff5cf332..b4865172c 100644 --- a/lib/create.c +++ b/lib/create.c @@ -314,7 +314,7 @@ disk_create_qcow2 (guestfs_h *g, const char *orig_filename, int64_t size, } /* Assemble the qemu-img command line. */ - guestfs_int_cmd_add_arg (cmd, "qemu-img"); + guestfs_int_cmd_add_arg (cmd, QEMU_IMG); guestfs_int_cmd_add_arg (cmd, "create"); guestfs_int_cmd_add_arg (cmd, &quo...
2014 Nov 23
0
[PATCH 1/3] lib: guestfs_disk_create: Allow vmdk as a valid backingformat.
...ny format permitted by qemu, but this commit just adds "vmdk" to this whitelist. --- src/create.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/create.c b/src/create.c index 621ace5..bfb8b76 100644 --- a/src/create.c +++ b/src/create.c @@ -261,7 +261,12 @@ disk_create_qcow2 (guestfs_h *g, const char *orig_filename, int64_t size, if (optargs->bitmask & GUESTFS_DISK_CREATE_BACKINGFORMAT_BITMASK) { backingformat = optargs->backingformat; - if (STRNEQ (backingformat, "raw") && STRNEQ (backingformat, "qcow2")) { + /* Co...
2014 Nov 23
7
[PATCH 0/3] patches needed for virt-bmap
See http://rwmj.wordpress.com/2014/11/23/mapping-files-to-disk/
2020 Feb 24
3
*** buffer overflow detected *** accessing invalid FD in libguestfs
....so.6 #6 0x00007ffff72e8c0a in __fdelt_warn () from /lib/x86_64-linux-gnu/libc.so.6 #7 0x00007ffff47ed8ba in loop (cmd=cmd@entry=0x7fffbc02abe0) at ../../../lib/command.c:662 #8 0x00007ffff47ee2f5 in guestfs_int_cmd_run (cmd=0x7fffbc02abe0) at ../../../lib/command.c:767 #9 0x00007ffff47efefc in disk_create_qcow2 (optargs=0x7fffbc008d60, backingfile=0x7fffbc09ef30 "/var/lib/nova/instances/5ca86029-d296-4261-9a67-908bdd6c4eab/disk", size=-1, orig_filename=0x7fffbc0301f0 "/tmp/libguestfszZtmRI/overlay1.qcow2", g=0x7fffbc008d60) at ../../../lib/create.c:348 #10 guestfs_impl_disk_create...
2015 Aug 12
1
[PATCH 1/2] disk-create: Allow preallocation off/metadata/full.
...->preallocation, "sparse")) + if (STREQ (optargs->preallocation, "off") || + STREQ (optargs->preallocation, "sparse")) allocated = 0; else if (STREQ (optargs->preallocation, "full")) allocated = 1; @@ -273,8 +274,15 @@ disk_create_qcow2 (guestfs_h *g, const char *orig_filename, int64_t size, } } if (optargs->bitmask & GUESTFS_DISK_CREATE_PREALLOCATION_BITMASK) { - preallocation = optargs->preallocation; - if (STRNEQ (preallocation, "off") && STRNEQ (preallocation, "metadata"))...
2014 Jan 28
11
[PATCH 00/10] New API: disk-create for creating blank disks.
A lot of code runs 'qemu-img create' or 'truncate' to create blank disk images. In the past I resisted adding an API to do this, since it essentially duplicates what you can already do using other tools (ie. qemu-img). However this does simplify calling code quite a lot since qemu-img is somewhat error-prone to use (eg: don't try to create a disk called "foo:bar")
2015 Sep 29
0
[PATCH 4/4] lib: Remove unused header files.
...lude "guestfs.h" #include "guestfs-internal.h" #include "guestfs-internal-actions.h" -#include "guestfs_protocol.h" static int disk_create_raw (guestfs_h *g, const char *filename, int64_t size, const struct guestfs_disk_create_argv *optargs); static int disk_create_qcow2 (guestfs_h *g, const char *filename, int64_t size, const char *backingfile, const struct guestfs_disk_create_argv *optargs); diff --git a/src/dbdump.c b/src/dbdump.c index db0f433..95a8dfb 100644 --- a/src/dbdump.c +++ b/src/dbdump.c @@ -20,13 +20,7 @@ #include <stdio.h> #include <stdl...
2015 Sep 29
8
[PATCH 1/4] lib: actions: Remove some unused header files.
--- generator/c.ml | 2 -- 1 file changed, 2 deletions(-) diff --git a/generator/c.ml b/generator/c.ml index 055b683..963cf21 100644 --- a/generator/c.ml +++ b/generator/c.ml @@ -1213,9 +1213,7 @@ and generate_client_actions hash () = #include <stdlib.h> #include <stdint.h> #include <inttypes.h> -#include <sys/types.h> #include <sys/stat.h> -#include
2017 Apr 04
1
[PATCH] Use Unicode single quotes ‘’ in place of short single quoted strings throughout.
...SCHR (statbuf.st_mode)) { - error (g, _("refusing to overwrite char device '%s'"), filename); + error (g, _("refusing to overwrite char device ‘%s’"), filename); return -1; } /* Block devices have to be handled specially. */ @@ -273,7 +273,7 @@ disk_create_qcow2 (guestfs_h *g, const char *orig_filename, int64_t size, if (STRNEQ (backingformat, "raw") && STRNEQ (backingformat, "qcow2") && STRNEQ (backingformat, "vmdk")) { - error (g, _("invalid value for backingformat parameter &...
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.