Message ID | 20211105140425.8272-1-chrubis@suse.cz |
---|---|
State | Accepted |
Headers | show |
Series | metadata: Ignore system macros | expand |
Hi Cyril, > Ingore all macros that start with underscore. Unless we do that we get > several thousands of __NR_foo macros and the hash table cannot keep up. > Signed-off-by: Cyril Hrubis <chrubis@suse.cz> Reviewed-by: Petr Vorel <pvorel@suse.cz> Good catch. Suppose skipping many tests does not need print info under verbose. Kind regards, Petr
Hello, Cyril Hrubis <chrubis@suse.cz> writes: > Ingore all macros that start with underscore. Unless we do that we get > several thousands of __NR_foo macros and the hash table cannot keep up. > > Signed-off-by: Cyril Hrubis <chrubis@suse.cz> Reviewed-by: Richard Palethorpe <rpalethorpe@suse.com> > --- > metadata/metaparse.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/metadata/metaparse.c b/metadata/metaparse.c > index b38550550..f71d8628d 100644 > --- a/metadata/metaparse.c > +++ b/metadata/metaparse.c > @@ -624,6 +624,9 @@ static void parse_macro(FILE *f) > > macro_get_val(f, val, sizeof(val)); > > + if (name[0] == '_') > + return; > + > ENTRY e = { > .key = strdup(name), > .data = strdup(val), > -- > 2.32.0
Hi! Thank you both for the quick review, pushed.
diff --git a/metadata/metaparse.c b/metadata/metaparse.c index b38550550..f71d8628d 100644 --- a/metadata/metaparse.c +++ b/metadata/metaparse.c @@ -624,6 +624,9 @@ static void parse_macro(FILE *f) macro_get_val(f, val, sizeof(val)); + if (name[0] == '_') + return; + ENTRY e = { .key = strdup(name), .data = strdup(val),
Ingore all macros that start with underscore. Unless we do that we get several thousands of __NR_foo macros and the hash table cannot keep up. Signed-off-by: Cyril Hrubis <chrubis@suse.cz> --- metadata/metaparse.c | 3 +++ 1 file changed, 3 insertions(+)