summaryrefslogtreecommitdiff
path: root/filesystem/filesystem.go
diff options
context:
space:
mode:
Diffstat (limited to 'filesystem/filesystem.go')
-rw-r--r--filesystem/filesystem.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go
index cd3808c56..1d32b8f70 100644
--- a/filesystem/filesystem.go
+++ b/filesystem/filesystem.go
@@ -98,6 +98,14 @@ type SymlinkDefinition struct {
Name *string
}
+// CopyWithNamePrefix returns a new [SymlinkDefinition] with prefix added to Name.
+func (s *SymlinkDefinition) CopyWithNamePrefix(prefix string) SymlinkDefinition {
+ return SymlinkDefinition{
+ Target: s.Target,
+ Name: proptools.StringPtr(filepath.Join(prefix, proptools.String(s.Name))),
+ }
+}
+
type FilesystemProperties struct {
// When set to true, sign the image with avbtool. Default is false.
Use_avb *bool