Displaying 3 results from an estimated 3 matches for "a239111".
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.
...L, NULL);
- while ((r = fread (buffer, 1, sizeof buffer, fp)) > 0) {
+ while ((r = fread (buffer, 1, GUESTFS_MAX_CHUNK_SIZE, fp)) > 0) {
if (send_file_write (buffer, r) < 0) {
pclose (fp);
return -1;
diff --git a/daemon/ntfsclone.c b/daemon/ntfsclone.c
index 732ab79..a239111 100644
--- a/daemon/ntfsclone.c
+++ b/daemon/ntfsclone.c
@@ -152,7 +152,13 @@ do_ntfsclone_out (const char *device,
int r;
FILE *fp;
CLEANUP_FREE char *cmd = NULL;
- char buf[GUESTFS_MAX_CHUNK_SIZE];
+ CLEANUP_FREE char *buf = NULL;
+
+ buf = malloc (GUESTFS_MAX_CHUNK_SIZE);
+ if (buf...
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
...(sock, lenbuf, sizeof lenbuf) == -1) {
- perror ("xwrite");
- exit (EXIT_FAILURE);
- }
+ if (xwrite (sock, lenbuf, sizeof lenbuf) == -1)
+ error (EXIT_FAILURE, errno, "xwrite");
xdr_destroy (&xdr);
diff --git a/daemon/ntfsclone.c b/daemon/ntfsclone.c
index a239111..f04017c 100644
--- a/daemon/ntfsclone.c
+++ b/daemon/ntfsclone.c
@@ -23,6 +23,8 @@
#include <inttypes.h>
#include <string.h>
#include <unistd.h>
+#include <errno.h>
+#include <error.h>
#include "read-file.h"
@@ -42,10 +44,8 @@ read_error_file (char *...