Displaying 3 results from an estimated 3 matches for "hseek".
Did you mean:
lseek
2010 Aug 26
1
[PATCH] New APIs: hopen-device hopen-file hread hwrite hseek hclose hclose-all
...ssize_t out = write(handle, content + pos, content_size - pos);
+
+ if (out < 0) {
+ reply_with_perror_errno(errno, "error writing to handle %i", handle);
+ return -1;
+ }
+ pos += out;
+ }
+
+ return 0;
+}
+
+int64_t /* RInt64 */
+do_hseek (int handle, int64_t offset, int whence)
+{
+ int64_t ret = lseek(handle, offset, whence);
+ if (ret < 0) {
+ reply_with_perror_errno(errno, "error seeking in handle %i", handle);
+ return -1;
+ }
+
+ return ret;
+}
diff --git a/daemon/m4/gnulib-cache.m4 b/dae...
2010 Sep 21
2
[PATCH 0/2] *** SUBJECT HERE ***
*** BLURB HERE ***
Matthew Booth (2):
New APIs: hopen-device hopen-file hread hwrite hseek hclose
hclose-all
Update pwrite to write a full buffer
daemon/.gitignore | 1 +
daemon/Makefile.am | 1 +
daemon/file.c | 20 ++-
daemon/hfile.c | 249 ++++++++++++++++++++++++++++++++++++++++
daemon/m4/gnulib-cache.m4...
2010 Sep 21
1
[PREVIEW ONLY] Refactor data transfer code
This patch refactors the data transfer code with several goals:
* Have a common read(source)/write(target) loop so that common processing can
happen in the middle of it, e.g. format change/progress bar
* Provide volume metadata to transfers to allow smarter reading/writing, e.g. of
sparse files
* Simplify the data transfer code
The patch *isn't* NFC because there are some minor behaviour