diff --git a/util/autoport/ec_none.go b/util/autoport/ec_none.go index a1a0df94f0..ceb84a0528 100644 --- a/util/autoport/ec_none.go +++ b/util/autoport/ec_none.go @@ -16,9 +16,6 @@ Method(_PTS, 1) } `) - si := Create(ctx, "acpi/superio.asl") - defer si.Close() - - ec := Create(ctx, "acpi/ec.asl") - defer ec.Close() + Create_Empty(ctx, "acpi/superio.asl", ASL) + Create_Empty(ctx, "acpi/ec.asl", ASL) } diff --git a/util/autoport/main.go b/util/autoport/main.go index c4f884a985..1246e3277c 100644 --- a/util/autoport/main.go +++ b/util/autoport/main.go @@ -120,8 +120,9 @@ var CommentFormatStrings map[Filetype]string = map[Filetype]string { type License string const ( - GPL2_only License = "GPL-2.0-only" - GPL2_or_later = "GPL-2.0-or-later" + CC_PDDC License = "CC-PDDC" + GPL2_only = "GPL-2.0-only" + GPL2_or_later = "GPL-2.0-or-later" ) var KconfigBool map[string]bool = map[string]bool{} @@ -233,6 +234,13 @@ func Create(ctx Context, name string) *os.File { } return mf } +func Create_Empty(ctx Context, name string, filetype Filetype) { + f := Create(ctx, name) + defer f.Close() + Add_SPDX(f, filetype, CC_PDDC) + Add_Comment(f, filetype, + "Please update the license if adding licensable material.") +} func Add_SPDX(f *os.File, filetype Filetype, license License) { Add_Comment(f, filetype, "SPDX-License-Identifier: " + string(license))