Displaying 15 results from an estimated 15 matches for "so_siz".
Did you mean:
so_size
2013 Nov 27
20
[PATCH 0/4] efi: PE header generation fix
The PE headers of the generated efi file were quite buggy. And since OVMF
perform a few consistency checks, syslinux was unable to run on it. I don't
pretend to have a thorough understanding of the PE+ headers, some bugs may
remain. :)
Celelibi (4):
efi: Fix PE header field rva_and_sizes_nr
efi: Location, size and alignment of .text section
efi: Useless relocations in PE file
efi: PE
2016 Jan 21
0
[PATCH v3 2/6] daemon: Split out command() functions and CLEANUP_* macros into separate files.
...pecified
+ * 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) *...
2013 Nov 27
0
[PATCH 2/4] efi: Location, size and alignment of .text section
...diff --git a/efi/wrapper.c b/efi/wrapper.c
index ec77271..bd2c175 100644
--- a/efi/wrapper.c
+++ b/efi/wrapper.c
@@ -54,11 +54,15 @@ static void write_header(FILE *f, __uint32_t entry, size_t data_size,
struct coff_hdr c_hdr;
struct header hdr;
struct coff_reloc c_rel;
- __uint32_t total_sz = so_size;
+ __uint32_t total_sz = data_size;
__uint32_t dummy = 0;
__uint32_t hdr_sz;
__uint32_t reloc_start, reloc_end;
+ hdr_sz = 512;
+ total_sz += hdr_sz;
+ entry += hdr_sz;
+
memset(&hdr, 0, sizeof(hdr));
hdr.msdos_signature = MSDOS_SIGNATURE;
@@ -77,11 +81,6 @@ static void write_hea...
2013 Dec 01
0
[PATCH v2 4/4] efi: PE file size differ from in-memory size
...) >> 2;
. = ALIGN(128);
-
+
/* Very large objects which don't need to be zeroed */
.hugebss : {
diff --git a/efi/wrapper.c b/efi/wrapper.c
index 4839e52..1988124 100644
--- a/efi/wrapper.c
+++ b/efi/wrapper.c
@@ -35,7 +35,7 @@ typedef Elf64_Addr Elf_Addr;
#endif
/*
- * 'so_size' is the file size of the ELF shared object.
+ * 'so_memsz' is the size of the ELF shared object once loaded.
* 'data_size' is the size of initialised data in the shared object.
* 'class' dictates how the header is written
* For 32bit machines (class == ELFCLASS3...
2013 Nov 27
0
[PATCH 4/4] efi: PE file size differ from in-memory size
...) >> 2;
. = ALIGN(128);
-
+
/* Very large objects which don't need to be zeroed */
.hugebss : {
diff --git a/efi/wrapper.c b/efi/wrapper.c
index 9652368..a5247ae 100644
--- a/efi/wrapper.c
+++ b/efi/wrapper.c
@@ -35,7 +35,7 @@ typedef Elf64_Addr Elf_Addr;
#endif
/*
- * 'so_size' is the file size of the ELF shared object.
+ * 'so_memsz' is the size of the ELF shared object once loaded.
* 'data_size' is the size of initialised data in the shared object.
* 'class' dictates how the header is written
* For 32bit machines (class == ELFCLASS3...
2012 Dec 13
2
[PATCH 1/2] daemon: NFC Use symbolic names in commandrvf
...PE_READ], buf, sizeof buf);
if (r == -1) {
perror ("read");
goto quit;
}
- if (r == 0) { FD_CLR (so_fd[0], &rset); quit++; }
+ if (r == 0) { FD_CLR (so_fd[PIPE_READ], &rset); quit++; }
if (r > 0 && stdoutput) {
so_size += r;
@@ -970,17 +975,17 @@ commandrvf (char **stdoutput, char **stderror, int flags,
}
}
- if (FD_ISSET (se_fd[0], &rset2)) { /* something on stderr */
- r = read (se_fd[0], buf, sizeof buf);
+ if (FD_ISSET (se_fd[PIPE_READ], &rset2)) { /* something on stderr */
+...
2013 Nov 29
1
[PATCH 2/4] efi: Location, size and alignment of .text section
....c
> index ec77271..bd2c175 100644
> --- a/efi/wrapper.c
> +++ b/efi/wrapper.c
> @@ -54,11 +54,15 @@ static void write_header(FILE *f, __uint32_t entry, size_t data_size,
> struct coff_hdr c_hdr;
> struct header hdr;
> struct coff_reloc c_rel;
> - __uint32_t total_sz = so_size;
> + __uint32_t total_sz = data_size;
> __uint32_t dummy = 0;
> __uint32_t hdr_sz;
> __uint32_t reloc_start, reloc_end;
>
> + hdr_sz = 512;
Please include a comment to explain the magic 512.
> @@ -163,6 +159,16 @@ static void write_header(FILE *f, __uint32_t entry, s...
2013 Dec 01
0
[PATCH v2 3/4] efi: Useless relocations in PE file
...o_hdr.initialized_data_sz = data_size;
fwrite(&o_hdr_pe32p, sizeof(o_hdr_pe32p), 1, f);
- memset(&e_hdr_pe32p, 0, sizeof(e_hdr));
+ memset(&e_hdr_pe32p, 0, sizeof(e_hdr_pe32p));
e_hdr_pe32p.section_align = 4096;
e_hdr_pe32p.file_align = 512;
e_hdr_pe32p.image_sz = hdr_sz + so_size;
@@ -144,26 +142,6 @@ static void write_header(FILE *f, __uint32_t entry, size_t data_size,
fwrite(&t_sec, sizeof(t_sec), 1, f);
/*
- * Write our dummy relocation and reloc section.
- */
- memset(&r_sec, 0, sizeof(r_sec));
- strcpy((char *)r_sec.name, ".reloc");
- r_sec.v...
2013 Nov 27
0
[PATCH 3/4] efi: Useless relocations in PE file
...o_hdr.initialized_data_sz = data_size;
fwrite(&o_hdr_pe32p, sizeof(o_hdr_pe32p), 1, f);
- memset(&e_hdr_pe32p, 0, sizeof(e_hdr));
+ memset(&e_hdr_pe32p, 0, sizeof(e_hdr_pe32p));
e_hdr_pe32p.section_align = 4096;
e_hdr_pe32p.file_align = 512;
e_hdr_pe32p.image_sz = hdr_sz + so_size;
@@ -140,26 +138,6 @@ static void write_header(FILE *f, __uint32_t entry, size_t data_size,
fwrite(&t_sec, sizeof(t_sec), 1, f);
/*
- * Write our dummy relocation and reloc section.
- */
- memset(&r_sec, 0, sizeof(r_sec));
- strcpy((char *)r_sec.name, ".reloc");
- r_sec.v...
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 Nov 09
1
[PATCH libguestfs] indent with spaces, not TABs
...ex f1595e5..9c1b5c6 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 +=...
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.
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
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...hing on stdout */
r = read (so_fd[0], buf, sizeof buf);
if (r == -1) {
- perror ("read");
- goto quit;
+ perror ("read");
+ goto quit;
}
if (r == 0) { FD_CLR (so_fd[0], &rset); quit++; }
if (r > 0 && stdoutput) {
- so_size += r;
- p = realloc (*stdoutput, so_size);
- if (p == NULL) {
- perror ("realloc");
- goto quit;
- }
- *stdoutput = p;
- memcpy (*stdoutput + so_size - r, buf, r);
+ so_size += r;
+ p = realloc (*stdoutput, so_size);
+ if (p == NULL) {
+ perror ("re...