summaryrefslogtreecommitdiff
path: root/filesystem/filesystem.go
diff options
context:
space:
mode:
author Jihoon Kang <jihoonkang@google.com> 2024-12-09 22:16:26 +0000
committer Jihoon Kang <jihoonkang@google.com> 2024-12-10 18:16:54 +0000
commit0a453891470778b4ae3ff5da145bf436303d5945 (patch)
tree68faf2bd3ba690d311d9dde700f1da6b9804af4c /filesystem/filesystem.go
parentb58eccb619f30120d3c230cd0c77945038659881 (diff)
Define additional symlinks and dirs for recovery partition
To match that of the make generated recovery partition. Test: mount Soong generated recovery partition and compare with TARGET_RECOVERY_ROOT_OUT Bug: 381888358 Change-Id: I39822027088895525ef473ad9797f410d45ec7cd
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 b9cb0769a..7cd5b72a8 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