Displaying 8 results from an estimated 8 matches for "se_size".
Did you mean:
s_size
2016 Jan 21
0
[PATCH v3 2/6] daemon: Split out command() functions and CLEANUP_* macros into separate files.
...command. The file descriptor is ORed with the flags, and that file
+ * descriptor is always closed by this function. See hexdump.c for an
+ * example of usage.
+ */
+int
+commandrvf (char **stdoutput, char **stderror, unsigned flags,
+ char const* const *argv)
+{
+ size_t so_size = 0, se_size = 0;
+ int so_fd[2], se_fd[2];
+ unsigned flag_copy_stdin = flags & COMMAND_FLAG_CHROOT_COPY_FILE_TO_STDIN;
+ int flag_copy_fd = (int) (flags & COMMAND_FLAG_FD_MASK);
+ pid_t pid;
+ int r, quit, i;
+ fd_set rset, rset2;
+ char buf[256];
+ char *p;
+
+ if (stdoutput) *stdoutput = NU...
2009 Nov 09
1
[PATCH libguestfs] indent with spaces, not TABs
...c1b5c6 100644
--- a/daemon/guestfsd.c
+++ b/daemon/guestfsd.c
@@ -641,7 +641,7 @@ commandvf (char **stdoutput, char **stderror, int flags,
*/
int
commandrvf (char **stdoutput, char **stderror, int flags,
- char const* const *argv)
+ char const* const *argv)
{
int so_size = 0, se_size = 0;
int so_fd[2], se_fd[2];
@@ -746,19 +746,19 @@ commandrvf (char **stdoutput, char **stderror, int flags,
if (r == 0) { FD_CLR (se_fd[0], &rset); quit++; }
if (r > 0) {
- if (verbose)
- ignore_value (write (2, buf, r));
-
- if (stderror) {
- se_size += r;
- p = rea...
2012 Mar 13
2
[PATCH 0/2] 'int' to 'size_t' changes
These two patches are probably not completely independent, but
separating them is a lot of work.
With *both* patches applied, all the tests and extra-tests pass.
That's no guarantee however that there isn't a mistake, so I don't
think this patch is a candidate for the 1.16 branch, until it's had a
lot more testing in development.
Rich.
2012 Dec 13
2
[PATCH 1/2] daemon: NFC Use symbolic names in commandrvf
...) { FD_CLR (se_fd[0], &rset); quit++; }
+ if (r == 0) { FD_CLR (se_fd[PIPE_READ], &rset); quit++; }
if (r > 0) {
if (verbose)
- ignore_value (write (2, buf, r));
+ ignore_value (write (STDERR_FILENO, buf, r));
if (stderror) {
se_size += r;
@@ -996,8 +1001,8 @@ commandrvf (char **stdoutput, char **stderror, int flags,
}
}
- close (so_fd[0]);
- close (se_fd[0]);
+ close (so_fd[PIPE_READ]);
+ close (se_fd[PIPE_READ]);
/* Make sure the output buffers are \0-terminated. Also remove any
* trailing \n character...
2015 Dec 05
6
[PATCH 0/6 v2] [FOR COMMENTS ONLY] Rework inspection.
This is a more working version. Inspection (partially) succeeds on a
real guest this time :-)
You can test it out on a real guest (in this case, a CentOS disk image
located at /tmp/centos-6.img) by doing:
$ ./run guestfish -v -x -a /tmp/centos-6.img
><fs> run
><fs> debug sh "guestfs-inspection --verbose"
which will print lots of debugging, and at the end the
2016 Jan 21
8
[PATCH v3 0/6] [FOR COMMENTS ONLY] Rework inspection.
For background on this change, see:
https://rwmj.wordpress.com/2015/12/06/inspection-now-with-added-prolog/
v2 was previously posted here:
https://www.redhat.com/archives/libguestfs/2015-December/msg00038.html
To test this patch series on a real guest, you can do:
$ ./run guestfish -v -x -a /var/tmp/centos-6.img
><fs> run
><fs> debug sh "guestfs-inspection
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...thing on stderr */
r = read (se_fd[0], buf, sizeof buf);
if (r == -1) {
- perror ("read");
- goto quit;
+ perror ("read");
+ goto quit;
}
if (r == 0) { FD_CLR (se_fd[0], &rset); quit++; }
if (r > 0 && stderror) {
- se_size += r;
- p = realloc (*stderror, se_size);
- if (p == NULL) {
- perror ("realloc");
- goto quit;
- }
- *stderror = p;
- memcpy (*stderror + se_size - r, buf, r);
+ se_size += r;
+ p = realloc (*stderror, se_size);
+ if (p == NULL) {
+ perror ("realloc...
2009 Aug 17
13
total warning-removal for daemon/
The warnings in daemon were aggravating and risky
for development (too easy to miss new ones) so I spent some
time last week and today working on removing them.
The first patch gets us down to almost no warnings with
the original -Wall setting. That was by far the hardest part.
Once I'd done that, I enabled nearly all of gcc's warnings via
gnulib's warnings and manywarnings modules