]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
path-lookup: assert that LOOKUP_PATHS_{EXCLUDE,TEMPORARY}_GENERATED are not used...
authorMike Yuan <me@yhndnzj.com>
Sun, 6 Oct 2024 17:41:33 +0000 (19:41 +0200)
committerMike Yuan <me@yhndnzj.com>
Sun, 6 Oct 2024 17:42:39 +0000 (19:42 +0200)
src/libsystemd/sd-path/path-lookup.c

index 2e59dca235beb4ed2c39c5c2aff9da576c37cedd..632514440769544fe4a7759e891b75f7b5bb9217 100644 (file)
@@ -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)