]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bpf-foreign: add an explicit, explanatory message when reference BPF program is not...
authorLennart Poettering <lennart@poettering.net>
Mon, 26 Jun 2023 11:05:56 +0000 (13:05 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 26 Jun 2023 11:05:56 +0000 (13:05 +0200)
src/core/bpf-foreign.c

index 4ee76abfc13b26e62f78ff635d0fa00f4cbf19b0..cff2f617fb00cce39cd21a12269bcb7baeb1d697 100644 (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);