search for: parse_index

Displaying 17 results from an estimated 17 matches for "parse_index".

Did you mean: parsed_index
2014 Apr 22
3
[PATCH 1/2] builder: add an optional suffix string for INI parsing errors
...c b/builder/index-parser-c.c index 5dcc82f..099bdf8 100644 --- a/builder/index-parser-c.c +++ b/builder/index-parser-c.c @@ -46,7 +46,7 @@ extern void unix_error (int errcode, char * cmdname, value arg) Noreturn; extern int do_parse (struct parse_context *context, FILE *in); value -virt_builder_parse_index (value progv, value filenamev) +virt_builder_parse_index (value progv, value error_suffixv, value filenamev) { CAMLparam2 (progv, filenamev); CAMLlocal5 (rv, v, sv, sv2, fv); @@ -58,6 +58,7 @@ virt_builder_parse_index (value progv, value filenamev) parse_context_init (&context); co...
2014 Mar 19
7
[PATCH 1/3] builder: make the C index parser reentrant
.../builder/index-parser-c.c @@ -43,7 +43,7 @@ extern void unix_error (int errcode, char * cmdname, value arg) Noreturn; #include "index-struct.h" #include "index-parse.h" -extern FILE *yyin; +extern int do_parse (struct parse_context *context, FILE *in); value virt_builder_parse_index (value filenamev) @@ -52,26 +52,30 @@ virt_builder_parse_index (value filenamev) CAMLlocal5 (rv, v, sv, sv2, fv); struct section *sections; size_t i, nr_sections; + struct parse_context context; + FILE *in; - yyin = fopen (String_val (filenamev), "r"); - if (yyin == NULL) +...
2015 Jul 02
0
[PATCH] Fix various -Wformat problems.
...c/launch.c | 2 +- src/proto.c | 2 +- test-tool/test-tool.c | 2 +- 26 files changed, 84 insertions(+), 70 deletions(-) diff --git a/builder/pxzcat-c.c b/builder/pxzcat-c.c index fb1a865..0c4a4be 100644 --- a/builder/pxzcat-c.c +++ b/builder/pxzcat-c.c @@ -298,7 +298,7 @@ parse_indexes (value filenamev, int fd) /* Does the stream footer look reasonable? */ r = lzma_stream_footer_decode (&footer_flags, footer); if (r != LZMA_OK) { - fprintf (stderr, "invalid stream footer - error %d\n", r); + fprintf (stderr, "invalid stream footer - e...
2015 Jul 02
0
[PATCH v2] Fix various -Wformat problems.
...c/launch.c | 2 +- src/proto.c | 2 +- test-tool/test-tool.c | 2 +- 26 files changed, 84 insertions(+), 70 deletions(-) diff --git a/builder/pxzcat-c.c b/builder/pxzcat-c.c index fb1a865..0c4a4be 100644 --- a/builder/pxzcat-c.c +++ b/builder/pxzcat-c.c @@ -298,7 +298,7 @@ parse_indexes (value filenamev, int fd) /* Does the stream footer look reasonable? */ r = lzma_stream_footer_decode (&footer_flags, footer); if (r != LZMA_OK) { - fprintf (stderr, "invalid stream footer - error %d\n", r); + fprintf (stderr, "invalid stream footer - e...
2015 Jul 08
7
[PATCH 0/6] RFC: basic subscription-manager support in virt-customize
Hi, this series introduces a basic support for registering/attaching/unregistering RHEL guests using subscription-manager, so it is possible to do for example: $ cat <<EOF > sm.conf [general] username=user password=pass [attach-0] pool=ID EOF $ virt-customize -a rhel-guest.qcow2 \ --sm-config sm.conf --sm-register --sm-attach 0 \ --install pkg1 --install pkg2
2014 Feb 21
2
[PATCH] builder: add an arch field to sources read from indexes
...lvexpand -> fp "lvexpand=%s\n" lvexpand ); + fp "arch=%s\n" arch; List.iter ( fun (lang, notes) -> match lang with @@ -108,7 +111,7 @@ and field = string * string option * string (* key + subkey + value *) (* Calls yyparse in the C code. *) external parse_index : string -> sections = "virt_builder_parse_index" -let get_index ~prog ~debug ~downloader ~sigchecker source = +let get_index ~prog ~debug ~downloader ~sigchecker ~arch source = let corrupt_file () = eprintf (f_"\nThe index file downloaded from '%s' is corrupt.\n...
2018 Nov 21
3
[PATCH nbdkit v2 0/3] Rewrite xz plugin as a filter.
v2: - Fixes a number of bugs in corner cases. - Uses a 1M block size to fetch from the underlying plugin. This improves performance considerably. I also tested this much more thoroughly and can't find any more bugs. Rich.
2017 Apr 19
4
[PATCH v2 0/2] daemon: Move the useful 'is_zero' function into common code.
v1 -> v2: The first patch is the same (the pure refactoring), but in the second patch I implement Eric Blake's suggested version. Rich.
2017 Apr 19
2
[PATCH] daemon: Move the useful 'is_zero' function into common code.
...h | 18 ------------------ lib/guestfs-internal-all.h | 18 ++++++++++++++++++ 3 files changed, 19 insertions(+), 37 deletions(-) diff --git a/builder/pxzcat-c.c b/builder/pxzcat-c.c index 33923b532..ef37849ed 100644 --- a/builder/pxzcat-c.c +++ b/builder/pxzcat-c.c @@ -409,24 +409,6 @@ parse_indexes (value filenamev, int fd) return combined_index; } -/* Return true iff the buffer is all zero bytes. - * - * Note that gcc is smart enough to optimize this properly: - * http://stackoverflow.com/questions/1493936/faster-means-of-checking-for-an-empty-buffer-in-c/1493989#1493989 - */ -static...
2018 Nov 21
5
[PATCH nbdkit 0/2] Rewrite xz plugin as a filter.
Matt asked if xz should really be a filter rather than a plugin. The answer is yes, of course it should be! That's been something in the todo file for a while. The commit converts the xz plugin code into a filter (leaving the plugin around, but deprecating it). plugin: nbdkit xz file.xz filter: nbdkit --filter=xz file file.xz plugin: # can't be done filter: nbdkit
2014 Jan 21
0
[PATCH] builder: proper consider subkeys in index files
...| 44 +++++++++++++++++++++++++------------------- 5 files changed, 46 insertions(+), 24 deletions(-) diff --git a/builder/index-parser-c.c b/builder/index-parser-c.c index 17e680b..fbbebff 100644 --- a/builder/index-parser-c.c +++ b/builder/index-parser-c.c @@ -49,7 +49,7 @@ value virt_builder_parse_index (value filenamev) { CAMLparam1 (filenamev); - CAMLlocal4 (rv, v, sv, fv); + CAMLlocal5 (rv, v, sv, sv2, fv); struct section *sections; size_t i, nr_sections; @@ -83,11 +83,18 @@ virt_builder_parse_index (value filenamev) for (j = 0, fields = sections->fields; fields != NULL;...
2014 Jan 21
2
Re: [PATCH] builder: proper consider subkeys in index files
On Tuesday 21 January 2014 16:37:20 Richard W.M. Jones wrote: > On Tue, Jan 21, 2014 at 05:18:27PM +0100, Pino Toscano wrote: > > + sv = caml_copy_string (fields->subkey ? fields->subkey : ""); > > > > Store_field (v, 1, sv); > > Heh, sure would be nice if this was an option type :-) > > I believe the following should work: > >
2014 Jan 21
3
[PATCH] builder: proper consider subkeys in index files
...er.ml | 44 ++++++++++++++++++++++++++------------------ 5 files changed, 41 insertions(+), 22 deletions(-) diff --git a/builder/index-parser-c.c b/builder/index-parser-c.c index 17e680b..baf2b62 100644 --- a/builder/index-parser-c.c +++ b/builder/index-parser-c.c @@ -83,11 +83,13 @@ virt_builder_parse_index (value filenamev) for (j = 0, fields = sections->fields; fields != NULL; j++, fields = fields->next) { - v = caml_alloc_tuple (2); + v = caml_alloc_tuple (3); sv = caml_copy_string (fields->key); - Store_field (v, 0, sv); /* (key, value) */ - s...
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.
...YY_EXTRA_TYPE struct parse_context * extern void yyerror (YYLTYPE * yylloc, yyscan_t scanner, struct parse_context *context, const char *msg); diff --git a/builder/pxzcat-c.c b/builder/pxzcat-c.c index 4b49e74..1f5ceeb 100644 --- a/builder/pxzcat-c.c +++ b/builder/pxzcat-c.c @@ -250,8 +250,8 @@ parse_indexes (value filenamev, int fd) { lzma_ret r; off_t pos, index_size; - uint8_t footer[LZMA_STREAM_HEADER_SIZE]; - uint8_t header[LZMA_STREAM_HEADER_SIZE]; + CLEANUP_FREE uint8_t *footer = NULL; + CLEANUP_FREE uint8_t *header = NULL; lzma_stream_flags footer_flags; lzma_stream_flags hea...
2015 May 15
5
[PATCH 0/4] Only tell people to use -v -x when reporting bugs if they're not using those flags.
.. and a lot of refactoring. https://bugzilla.redhat.com/show_bug.cgi?id=1167623 Rich.
2015 May 15
6
[PATCH v2 0/4] Only tell people to use -v -x when reporting bugs if they're not using those flags.
https://bugzilla.redhat.com/show_bug.cgi?id=1167623