1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-08-26 17:50:11 +03:00

bpf-foreign: add an explicit, explanatory message when reference BPF program is not loaded yet

(cherry picked from commit 228459f5d7)
(cherry picked from commit 178fe97763)
(cherry picked from commit 746e52c0ae)
This commit is contained in:
Lennart Poettering
2023-06-26 13:05:56 +02:00
committed by Luca Boccassi
parent 411e40bb72
commit 43cabc5e35

View File

@ -90,6 +90,10 @@ static int bpf_foreign_prepare(
assert(bpffs_path);
r = path_is_fs_type(bpffs_path, BPF_FS_MAGIC);
if (r == -ENOENT) {
log_unit_warning_errno(u, r, "bpf-foreign: foreign program %s does not exist, skipping.", bpffs_path);
return 0;
}
if (r < 0)
return log_unit_error_errno(u, r,
"bpf-foreign: Failed to determine filesystem type of %s: %m", bpffs_path);