Skip to content

Commit 110a96e

Browse files
danobiNobody
authored and
Nobody
committed
bpftool: Add SPDX identifier to btf-dump-file output
A concern about potential GPL violations came up at the new $DAYJOB when I tried to vendor the vmlinux.h output. The central point was that the generated vmlinux.h does not embed a license string -- making the licensing of the file non-obvious. This commit adds a LGPL-2.1 OR BSD-2-Clause SPDX license identifier to the generated vmlinux.h output. This is line with what bpftool generates in object file skeletons. Signed-off-by: Daniel Xu <[email protected]>
1 parent 02f2011 commit 110a96e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/bpf/bpftool/btf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ static int dump_btf_c(const struct btf *btf,
425425
if (err)
426426
return err;
427427

428+
printf("/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */\n\n");
428429
printf("#ifndef __VMLINUX_H__\n");
429430
printf("#define __VMLINUX_H__\n");
430431
printf("\n");

0 commit comments

Comments
 (0)