+/* SPDX-License-Identifier: LGPL-2.1+ */
/***
This file is part of systemd.
Copyright 2014 Zbigniew Jędrzejewski-Szmek
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <stdlib.h>
}
static int verify_executable(Unit *u, ExecCommand *exec) {
- if (exec == NULL)
+ if (!exec)
return 0;
if (access(exec->path, X_OK) < 0)
assert(u);
- if (log_get_max_level() >= LOG_DEBUG)
+ if (DEBUG_LOGGING)
unit_dump(u, stdout, "\t");
log_unit_debug(u, "Creating %s/start job", u->id);
return r;
}
-int verify_units(char **filenames, UnitFileScope scope, bool check_man) {
+int verify_units(char **filenames, UnitFileScope scope, bool check_man, bool run_generators) {
_cleanup_(sd_bus_error_free) sd_bus_error err = SD_BUS_ERROR_NULL;
_cleanup_free_ char *var = NULL;
Manager *m = NULL;
Unit *units[strv_length(filenames)];
int i, count = 0;
+ const uint8_t flags = MANAGER_TEST_RUN_BASIC |
+ MANAGER_TEST_RUN_ENV_GENERATORS |
+ run_generators * MANAGER_TEST_RUN_GENERATORS;
if (strv_isempty(filenames))
return 0;
assert_se(set_unit_path(var) >= 0);
- r = manager_new(scope, true, &m);
+ r = manager_new(scope, flags, &m);
if (r < 0)
return log_error_errno(r, "Failed to initialize manager: %m");