Displaying 4 results from an estimated 4 matches for "guestfs_download_offset".
2010 Sep 20
2
[PATCH 0/2] Implement upload-offset, download-offset APIs, and hexedit guestfish command
...here:
http://rwmj.wordpress.com/2010/09/18/new-feature-guestfish-hexedit/#content
The first part implements two new APIs for partial writing and reading
of files. These are modelled after guestfs_upload and
guestfs_download but allow you to specify an offset and (for download
only) a size:
int guestfs_download_offset (guestfs_h *g,
const char *remotefilename, const char *filename,
int64_t offset, int64_t size);
int guestfs_upload_offset (guestfs_h *g,
const char *filename, const char *remotefilename,
int64_t offset);
Since these calls use the streaming FileIn/FileOut part of the
protocol, they are both...
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 Mar 06
8
[PATCH 0/5] Use less stack.
Various changes/fixes to use smaller stack frames.
Rich.
2016 Mar 07
2
[PATCH v2] Use less stack.
...dit (const char *cmd, size_t argc, char *argv[])
if (editor == NULL)
editor = "hexedit";
- snprintf (buf, sizeof buf, "/dev/fd/%d", fd);
+ if (asprintf (&tmpfd, "/dev/fd/%d", fd) == -1) {
+ perror ("asprintf");
+ return -1;
+ }
- if (guestfs_download_offset (g, filename, buf, start, max) == -1) {
+ if (guestfs_download_offset (g, filename, tmpfd, start, max) == -1) {
unlink (tmp);
close (fd);
return -1;
@@ -140,11 +144,14 @@ run_hexedit (const char *cmd, size_t argc, char *argv[])
}
/* Edit it. */
- snprintf (buf, sizeof buf,...