From: Mike Yuan Date: Sun, 6 Oct 2024 17:41:33 +0000 (+0200) Subject: path-lookup: assert that LOOKUP_PATHS_{EXCLUDE,TEMPORARY}_GENERATED are not used... X-Git-Tag: v257-rc1~317^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=546110ded9c1cc0124e604f209c3f0ef442daaf0;p=thirdparty%2Fsystemd.git path-lookup: assert that LOOKUP_PATHS_{EXCLUDE,TEMPORARY}_GENERATED are not used in conjunction --- diff --git a/src/libsystemd/sd-path/path-lookup.c b/src/libsystemd/sd-path/path-lookup.c index 2e59dca235b..63251444076 100644 --- a/src/libsystemd/sd-path/path-lookup.c +++ b/src/libsystemd/sd-path/path-lookup.c @@ -417,6 +417,7 @@ int lookup_paths_init( assert(lp); assert(scope >= 0); assert(scope < _RUNTIME_SCOPE_MAX); + assert(!FLAGS_SET(flags, LOOKUP_PATHS_EXCLUDE_GENERATED|LOOKUP_PATHS_TEMPORARY_GENERATED)); if (!empty_or_root(root_dir)) { if (scope == RUNTIME_SCOPE_USER)