On Thu, 26.12.13 17:39, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote:
> As discussed on IRC, here's a patch which takes the simple approach of > allowing globbing on loaded unit names in various (almost all :)) systemctl > commands. Comments? Looks good. But maybe an additional warning should be printed if people use globs on the "systemctl start" command line? Some shorter version of the blurb you added to the man page? i am pretty sure people will run into this problem, and we should tell them what is going on... > +bool string_is_glob(const char *p) { > + return strchr(p, '*') || strchr(p, '?') || strchr(p, '['); > +} > + This looks prettier: #define GLOB_CHARS "*=[" bool string_is_glob(const char *p) { return !!strpbrk(p, GLOB_CHARS); } The macro should probably live in the header, next to ther others... And maybe the function too as static inline? given that is is just one function call internally that sounds pretty ok as static inline call? Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel