Displaying 10 results from an estimated 10 matches for "guestfs_impl_add_drive_scratch".
2017 Sep 20
1
Re: [PATCH 6/6] lib: Use guestfs_int_make_temp_path in a few more places.
...gt; errfd = open (cmd->error_file,
> O_WRONLY|O_CREAT|O_NOCTTY|O_TRUNC|O_CLOEXEC, 0600);
> if (errfd == -1) {
> diff --git a/lib/drives.c b/lib/drives.c
> index 117c8bf85..f43e64b10 100644
> --- a/lib/drives.c
> +++ b/lib/drives.c
> @@ -989,7 +989,9 @@ guestfs_impl_add_drive_scratch (guestfs_h *g, int64_t size,
> */
> if (guestfs_int_lazy_make_tmpdir (g) == -1)
> return -1;
> - filename = safe_asprintf (g, "%s/scratch.%d", g->tmpdir, ++g->unique);
> + filename = guestfs_int_make_temp_path (g, "scratch", "img");
&...
2017 Sep 19
0
[PATCH 6/6] lib: Use guestfs_int_make_temp_path in a few more places.
...(!cmd->error_file)
+ goto error;
errfd = open (cmd->error_file,
O_WRONLY|O_CREAT|O_NOCTTY|O_TRUNC|O_CLOEXEC, 0600);
if (errfd == -1) {
diff --git a/lib/drives.c b/lib/drives.c
index 117c8bf85..f43e64b10 100644
--- a/lib/drives.c
+++ b/lib/drives.c
@@ -989,7 +989,9 @@ guestfs_impl_add_drive_scratch (guestfs_h *g, int64_t size,
*/
if (guestfs_int_lazy_make_tmpdir (g) == -1)
return -1;
- filename = safe_asprintf (g, "%s/scratch.%d", g->tmpdir, ++g->unique);
+ filename = guestfs_int_make_temp_path (g, "scratch", "img");
+ if (!filename)
+ ret...
2017 Sep 19
7
[PATCH 0/6] Various clean ups in lib/
Miscellaneous small cleanups in lib/ directory.
Rich.
2020 Feb 11
2
[PATCH v2] lib: add support for disks with 4096 bytes sector size
...mp; !valid_blocksize (data.blocksize)) {
+ error (g, _("%s parameter is invalid"), "blocksize");
+ free_drive_servers (data.servers, data.nr_servers);
+ return -1;
+ }
if (STREQ (protocol, "file")) {
if (data.servers != NULL) {
@@ -982,6 +1012,10 @@ guestfs_impl_add_drive_scratch (guestfs_h *g, int64_t size,
add_drive_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_LABEL_BITMASK;
add_drive_optargs.label = optargs->label;
}
+ if (optargs->bitmask & GUESTFS_ADD_DRIVE_SCRATCH_BLOCKSIZE_BITMASK) {
+ add_drive_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_BLOCKS...
2020 Feb 10
1
[PATCH] lib: allow to specify physical/logical block size for disks
...if (!valid_blocksize (data.blocksize)) {
+ error (g, _("%s parameter is invalid"), "blocksize");
+ free_drive_servers (data.servers, data.nr_servers);
+ return -1;
+ }
if (STREQ (protocol, "file")) {
if (data.servers != NULL) {
@@ -982,6 +1012,10 @@ guestfs_impl_add_drive_scratch (guestfs_h *g, int64_t size,
add_drive_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_LABEL_BITMASK;
add_drive_optargs.label = optargs->label;
}
+ if (optargs->bitmask & GUESTFS_ADD_DRIVE_SCRATCH_BLOCKSIZE_BITMASK) {
+ add_drive_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_BLOCKS...
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.
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.
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
...char *filename,
- const char *iface)
+ const char *iface)
{
const struct guestfs_add_drive_opts_argv optargs = {
.bitmask = GUESTFS_ADD_DRIVE_OPTS_IFACE_BITMASK,
@@ -980,7 +980,7 @@ guestfs_impl_add_drive_ro_with_if (guestfs_h *g, const char *filename,
int
guestfs_impl_add_drive_scratch (guestfs_h *g, int64_t size,
- const struct guestfs_add_drive_scratch_argv *optargs)
+ const struct guestfs_add_drive_scratch_argv *optargs)
{
struct guestfs_add_drive_opts_argv add_drive_optargs = { .bitmask = 0 };
CLEANUP_FREE char *filename = NULL;
diff --git...
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.