On Wed, Jul 24, 2013 at 05:40:21PM +0200, Lennart Poettering wrote:
> On Wed, 24.07.13 11:25, Dave Reisner ([email protected]) wrote:
>
> > static char **include_prefixes = NULL;
> > +static char **exclude_prefixes = NULL;
> >
> > static const char conf_file_dirs[] =
> > "/etc/tmpfiles.d\0"
> > @@ -1018,6 +1019,21 @@ static bool item_equal(Item *a, Item *b) {
> > return true;
> > }
> >
> > +static bool should_exclude_path(const char *path) {
> > + char **prefix;
> > +
> > + /* no explicit paths specified for exclusion, so everything is
> > valid */
> > + if (strv_length(exclude_prefixes) == 0)
> > + return false;
> > +
> > + STRV_FOREACH(prefix, exclude_prefixes) {
> > + if (path_startswith(path, *prefix))
> > + return true;
> > + }
> > +
> > + return false;
> > +}
> > +
>
> I'd probably fold this into the same function as for the positive check...
>
Yeah, this was me being lazy. Applied brain, folded it in.
> > return 0;
> > @@ -1235,16 +1252,18 @@ static int parse_argv(int argc, char *argv[]) {
> > ARG_CREATE,
> > ARG_CLEAN,
> > ARG_REMOVE,
> > - ARG_PREFIX
> > + ARG_PREFIX,
> > + ARG_SKIP_PREFIX,
>
> Please don't rename this internally. Please call this ARG_EXCLUDE_PREFIX
> rather than ARG_SKIP_PREFIX.
Done.
> Looks good otherwise.
>
> Lennart
>
> --
> Lennart Poettering - Red Hat, Inc.
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel