diff options
author | 2024-10-11 16:30:00 +0000 | |
---|---|---|
committer | 2024-10-11 16:30:00 +0000 | |
commit | c307d014ff6d3c0788b808d3e4bdcabd69aa22ab (patch) | |
tree | 72cde2c31603c4b118bc1b2a1f3165934075d80d /filesystem/filesystem.go | |
parent | 457d5f0b73e753759c6753c398c8311f67ea6465 (diff) | |
parent | efc456a762db406022537b696a1d6eae73880f9a (diff) |
Merge "Create an empty system_ext partition for aosp_cf_*" into main
Diffstat (limited to 'filesystem/filesystem.go')
-rw-r--r-- | filesystem/filesystem.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go index 87c6381c0..1ab07a2e7 100644 --- a/filesystem/filesystem.go +++ b/filesystem/filesystem.go @@ -198,6 +198,10 @@ const ( unknown ) +func (fs fsType) IsUnknown() bool { + return fs == unknown +} + type FilesystemInfo struct { // A text file containing the list of paths installed on the partition. FileListFile android.Path @@ -205,8 +209,7 @@ type FilesystemInfo struct { var FilesystemProvider = blueprint.NewProvider[FilesystemInfo]() -func (f *filesystem) fsType(ctx android.ModuleContext) fsType { - typeStr := proptools.StringDefault(f.properties.Type, "ext4") +func GetFsTypeFromString(ctx android.EarlyModuleContext, typeStr string) fsType { switch typeStr { case "ext4": return ext4Type @@ -220,6 +223,11 @@ func (f *filesystem) fsType(ctx android.ModuleContext) fsType { ctx.PropertyErrorf("type", "%q not supported", typeStr) return unknown } + +} + +func (f *filesystem) fsType(ctx android.ModuleContext) fsType { + return GetFsTypeFromString(ctx, proptools.StringDefault(f.properties.Type, "ext4")) } func (f *filesystem) installFileName() string { |