From 0a453891470778b4ae3ff5da145bf436303d5945 Mon Sep 17 00:00:00 2001 From: Jihoon Kang Date: Mon, 9 Dec 2024 22:16:26 +0000 Subject: 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 --- filesystem/filesystem.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'filesystem/filesystem.go') 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 -- cgit v1.2.3-59-g8ed1b