search for: create_drive_dev_null

Displaying 17 results from an estimated 17 matches for "create_drive_dev_null".

2016 Dec 11
3
[PATCH 0/2] generic function for temporary path generation
Cosmetic change as suggested in this previous patch: https://www.redhat.com/archives/libguestfs/2016-November/msg00111.html Matteo Cafasso (2): lib: generic function for temporary path generation lib: use guestfs_int_make_temp_path to generate temporary files src/drives.c | 5 ++--- src/file.c | 22 +++++++++------------- src/guestfs-internal.h | 1 + src/journal.c
2016 May 18
1
[PATCH] drives: force format=raw for /dev/null dummy drives
...t makes sense to specify the format explicitly and avoid the autodetection in qemu. --- src/drives.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/drives.c b/src/drives.c index c55b87e..1a4ae27 100644 --- a/src/drives.c +++ b/src/drives.c @@ -410,9 +410,15 @@ create_drive_dev_null (guestfs_h *g, { CLEANUP_FREE char *tmpfile = NULL; - if (data->format && STRNEQ (data->format, "raw")) { - error (g, _("for device '/dev/null', format must be 'raw'")); - return NULL; + if (data->format) { + if (data->format...
2016 May 18
1
[PATCH v2] drives: force format=raw for /dev/null dummy drives
...t makes sense to specify the format explicitly and avoid the autodetection in qemu. --- src/drives.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/drives.c b/src/drives.c index c55b87e..5e7eb12 100644 --- a/src/drives.c +++ b/src/drives.c @@ -410,9 +410,15 @@ create_drive_dev_null (guestfs_h *g, { CLEANUP_FREE char *tmpfile = NULL; - if (data->format && STRNEQ (data->format, "raw")) { - error (g, _("for device '/dev/null', format must be 'raw'")); - return NULL; + if (data->format) { + if (STRNEQ (data-&gt...
2016 Dec 11
0
[PATCH 2/2] lib: use guestfs_int_make_temp_path to generate temporary files
...| 5 ++--- src/file.c | 22 +++++++++------------- src/journal.c | 4 ++-- src/tsk.c | 17 ++--------------- 4 files changed, 15 insertions(+), 33 deletions(-) diff --git a/src/drives.c b/src/drives.c index 1e3b0af..1e04f81 100644 --- a/src/drives.c +++ b/src/drives.c @@ -421,7 +421,8 @@ create_drive_dev_null (guestfs_h *g, data->format = "raw"; } - if (guestfs_int_lazy_make_tmpdir (g) == -1) + tmpfile = guestfs_int_make_temp_path (g, "devnull"); + if (tmpfile == NULL) return NULL; /* Because we create a special file, there is no point forcing qemu @@ -429,8 +...
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 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.
2015 Feb 02
1
RFC: Handle query strings for http and https (RHBZ#1092583)
...ot;you cannot specify a secret with file-backed disks")); return -1; } + if (data.query != NULL) { + error (g, _("you cannot specify a query string with file-backed disks")); + return -1; + } if (STREQ (filename, "/dev/null")) drv = create_drive_dev_null (g, &data); diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h index 573c3da..439a80b 100644 --- a/src/guestfs-internal.h +++ b/src/guestfs-internal.h @@ -242,6 +242,8 @@ struct drive_source { char *username; /* Optional secret (may be NULL if not specified). */ char *secret;...
2013 Mar 15
0
[PATCH] lib: Add direct support for the NBD (Network Block Device) protocol.
...102,9 @@ create_drive_struct (guestfs_h *g, const char *path, * a null drive. */ static struct drive * -create_null_drive_struct (guestfs_h *g, bool readonly, const char *format, - const char *iface, const char *name, - const char *disk_label) +create_drive_dev_null (guestfs_h *g, bool readonly, const char *format, + const char *iface, const char *name, + const char *disk_label) { CLEANUP_FREE char *tmpfile = NULL; int fd = -1; @@ -107,30 +139,82 @@ create_null_drive_struct (guestfs_h *g, bool readonly, const...
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")
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.
2017 Sep 20
7
[PATCH v2] 0/6] Various clean ups in lib/
v1 -> v2: - Remove the unnecessary calls to guestfs_int_lazy_make_tmpdir in the final patch. Rich.
2017 Sep 19
7
[PATCH 0/6] Various clean ups in lib/
Miscellaneous small cleanups in lib/ directory. Rich.
2014 Mar 10
5
[PATCH 0/3] Add discard support.
These patches contain the beginnings of discard (a.k.a. trim or unmap) support. This will allow us to change virt-sparsify to work on disk images in-place (instead of using slow & inefficient copying). The approach used is to add an optional 'discard' parameter to add-drive. It has 3 possible settings: - 'disable' : the default, no discard is done - 'besteffort' :
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.
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.
2017 Apr 04
1
[PATCH] Use Unicode single quotes ‘’ in place of short single quoted strings throughout.
...size parameter '%d'"), + error (g, _("invalid value for clustersize parameter ‘%d’"), clustersize); return -1; } diff --git a/lib/drives.c b/lib/drives.c index 4cf41cd9b..ec8bdbbe4 100644 --- a/lib/drives.c +++ b/lib/drives.c @@ -412,7 +412,7 @@ create_drive_dev_null (guestfs_h *g, if (data->format) { if (STRNEQ (data->format, "raw")) { - error (g, _("for device '/dev/null', format must be 'raw'")); + error (g, _("for device ‘/dev/null’, format must be ‘raw’")); return NULL; }...
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.