[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH 0/2] Implement upload-offset, download-offset APIs, and hexedit guestfish command

This two-part patch implements the 'hexedit' command described here:


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 efficient and unlimited in the amount and type
of data that can be streamed.


I also wrote the hexedit command using the putative hread/hwrite API
and the code was much longer and more involved.  Although there is an
advantage to hread/hwrite which is you can read and write to and from

The second part of the patch implements the hexedit command itself in


Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]