summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/boot/efi/measure.h5
-rw-r--r--src/cgtop/cgtop.c20
-rw-r--r--src/nspawn/nspawn.c8
-rw-r--r--src/shared/meson.build2
-rw-r--r--test/README.testsuite2
5 files changed, 17 insertions, 20 deletions
diff --git a/src/boot/efi/measure.h b/src/boot/efi/measure.h
index a2cfe817d0..43aa8a0058 100644
--- a/src/boot/efi/measure.h
+++ b/src/boot/efi/measure.h
@@ -13,9 +13,6 @@
#ifndef __SDBOOT_MEASURE_H
#define __SDBOOT_MEASURE_H
-#ifndef SD_TPM_PCR
-#define SD_TPM_PCR 8
-#endif
-
EFI_STATUS tpm_log_event(UINT32 pcrindex, const EFI_PHYSICAL_ADDRESS buffer, UINTN buffer_size, const CHAR16 *description);
+
#endif
diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c
index 67f3a99860..7ebb02fa8c 100644
--- a/src/cgtop/cgtop.c
+++ b/src/cgtop/cgtop.c
@@ -75,6 +75,7 @@ static usec_t arg_delay = 1*USEC_PER_SEC;
static char* arg_machine = NULL;
static char* arg_root = NULL;
static bool arg_recursive = true;
+static bool arg_recursive_unset = false;
static enum {
COUNT_PIDS,
@@ -732,7 +733,6 @@ static int parse_argv(int argc, char *argv[]) {
{}
};
- bool recursive_unset = false;
int c, r;
assert(argc >= 1);
@@ -852,7 +852,7 @@ static int parse_argv(int argc, char *argv[]) {
}
arg_recursive = r;
- recursive_unset = r == 0;
+ arg_recursive_unset = r == 0;
break;
case 'M':
@@ -873,11 +873,6 @@ static int parse_argv(int argc, char *argv[]) {
return -EINVAL;
}
- if (recursive_unset && arg_count == COUNT_PIDS) {
- log_error("Non-recursive counting is only supported when counting processes, not tasks. Use -P or -k.");
- return -EINVAL;
- }
-
return 1;
}
@@ -902,6 +897,10 @@ int main(int argc, char *argv[]) {
log_parse_environment();
log_open();
+ r = parse_argv(argc, argv);
+ if (r <= 0)
+ goto finish;
+
r = cg_mask_supported(&mask);
if (r < 0) {
log_error_errno(r, "Failed to determine supported controllers: %m");
@@ -910,9 +909,10 @@ int main(int argc, char *argv[]) {
arg_count = (mask & CGROUP_MASK_PIDS) ? COUNT_PIDS : COUNT_USERSPACE_PROCESSES;
- r = parse_argv(argc, argv);
- if (r <= 0)
- goto finish;
+ if (arg_recursive_unset && arg_count == COUNT_PIDS) {
+ log_error("Non-recursive counting is only supported when counting processes, not tasks. Use -P or -k.");
+ return -EINVAL;
+ }
r = show_cgroup_get_path_and_warn(arg_machine, arg_root, &root);
if (r < 0) {
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index fd00d0957a..905dbc4c74 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -1158,6 +1158,10 @@ static int parse_argv(int argc, char *argv[]) {
arg_caps_retain = (arg_caps_retain | plus | (arg_private_network ? 1ULL << CAP_NET_ADMIN : 0)) & ~minus;
+ r = cg_unified_flush();
+ if (r < 0)
+ return log_error_errno(r, "Failed to determine whether the unified cgroups hierarchy is used: %m");
+
e = getenv("SYSTEMD_NSPAWN_CONTAINER_SERVICE");
if (e)
arg_container_service_name = e;
@@ -3545,10 +3549,6 @@ int main(int argc, char *argv[]) {
log_parse_environment();
log_open();
- r = cg_unified_flush();
- if (r < 0)
- return log_error_errno(r, "Failed to determine whether the unified cgroups hierarchy is used: %m");
-
/* Make sure rename_process() in the stub init process can work */
saved_argv = argv;
saved_argc = argc;
diff --git a/src/shared/meson.build b/src/shared/meson.build
index 0747f76649..f1d73d1b3f 100644
--- a/src/shared/meson.build
+++ b/src/shared/meson.build
@@ -127,10 +127,10 @@ libshared = shared_library(
basic_sources,
journal_internal_sources,
libsystemd_internal_sources,
+ libudev_sources,
include_directories : includes,
link_args : ['-shared'],
c_args : ['-fvisibility=default'],
- link_with : [libudev],
dependencies : [threads,
librt,
libcap,
diff --git a/test/README.testsuite b/test/README.testsuite
index fa7e73ce3a..58f67f50fd 100644
--- a/test/README.testsuite
+++ b/test/README.testsuite
@@ -3,7 +3,7 @@ subdirectories named "test/TEST-??-*", which are run one by one.
To run the extended testsuite do the following:
-$ make all
+$ make all # Avoid the "sudo make" below building anything as root
$ cd test
$ sudo make clean check
...