On Sun, 24.03.13 13:32, Łukasz Stelmach ([email protected]) wrote:

> Make "systemd-analyze dot" output only lines matching a regular
> expression passed on the command line. Without the regular expression
> print everything.

So far we mostly used globs everywhere in system. Does it really make
sense to use regexes here?

I mean, unit file names on purpose are "file-name like", and generally
even show up in the file system, so it sounds more natural to me to use
fnmatch here?

>          static const char * const colors[] = {
>                  "Requires",              "[color=\"black\"]",
> @@ -591,6 +594,7 @@ static int graph_one_property(const char *name, const 
> char *prop, DBusMessageIte
>                  "After",                 "[color=\"green\"]"
>          };
>  
> +        char buf[1024];

We generally avoid using fixed size strings like this. Use dynamic
memory for this if you can... i.e. asprintf(), and consider freeing it
with _cleanup_free_...

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to