Displaying 3 results from an estimated 3 matches for "8b4f600".
Did you mean:
68b4f000
2016 Nov 09
1
[PATCH] upload: improve file write callback
...l
change.
As the callback is using the entire struct, better to pass the pointer
to the struct itself.
Signed-off-by: Matteo Cafasso <noxdafox@gmail.com>
---
daemon/upload.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/daemon/upload.c b/daemon/upload.c
index f034627..8b4f600 100644
--- a/daemon/upload.c
+++ b/daemon/upload.c
@@ -84,7 +84,7 @@ upload (const char *filename, int flags, int64_t offset)
}
}
- r = receive_file (write_cb, &data.fd);
+ r = receive_file (write_cb, &data);
if (r == -1) { /* write error */
err = errno;
r = cancel_...
2016 Dec 14
0
[PATCH] daemon: expose file upload logic
...in upload.c --*/
+extern int upload_to_fd (int fd);
+
/* ordinary daemon functions use these to indicate errors
* NB: you don't need to prefix the string with the current command,
* it is added automatically by the client-side RPC stubs.
diff --git a/daemon/upload.c b/daemon/upload.c
index 8b4f600..0f385b6 100644
--- a/daemon/upload.c
+++ b/daemon/upload.c
@@ -54,60 +54,68 @@ write_cb (void *data_vp, const void *buf, size_t len)
return 0;
}
+int
+upload_to_fd (int fd)
+{
+ int ret = 0, err = 0;
+ struct write_cb_data data = { .fd = fd, .written = 0 };
+
+ ret = receive_file (write_cb...
2016 Dec 14
2
[PATCH] daemon: expose file upload logic
Exposing file upload logic as suggested in previous patch:
https://www.redhat.com/archives/libguestfs/2016-November/msg00109.html
Matteo Cafasso (1):
daemon: expose upload logic
daemon/daemon.h | 3 +++
daemon/upload.c | 70 ++++++++++++++++++++++++++++++++-------------------------
2 files changed, 42 insertions(+), 31 deletions(-)
--
2.10.2