@@ -218,17 +218,11 @@ func fstabEntriesToMountPoints(fstabEntries []diskutils.FstabEntry, diskPartitio
218
218
partUuidToFstabEntry := make (map [string ]diskutils.FstabEntry )
219
219
verityMetadataList := []verityDeviceMetadata (nil )
220
220
for _ , fstabEntry := range filteredFstabEntries {
221
- partitionType , partition , _ , verityMetadata , err := findSourcePartition (fstabEntry .Source , diskPartitions , buildDir )
221
+ _ , partition , _ , verityMetadata , err := findSourcePartition (fstabEntry .Source , diskPartitions , buildDir )
222
222
if err != nil {
223
223
return nil , nil , nil , err
224
224
}
225
225
226
- // ToDo: Ignore when overlay / diskpath enabled base image.
227
- //
228
- if partitionType == ExtendedMountIdentifierTypeOverlay || partitionType == ExtendedMountIdentifierTypeDiskPath {
229
- continue
230
- }
231
-
232
226
// Unset read-only flag so that read-only partitions can be customized.
233
227
vfsOptions := fstabEntry .VfsOptions & ^ diskutils .MountFlags (unix .MS_RDONLY )
234
228
@@ -289,16 +283,9 @@ func findSourcePartition(source string, partitions []diskutils.PartitionInfo,
289
283
return ExtendedMountIdentifierTypeDefault , diskutils.PartitionInfo {}, 0 , nil , err
290
284
}
291
285
292
- // ToDo: Ignore when customize overlay / diskpath enabled base image.
293
- //
294
- var partition diskutils.PartitionInfo
295
- var partitionIndex int
296
- var verityMetadata * verityDeviceMetadata
297
- if mountIdType != ExtendedMountIdentifierTypeOverlay && mountIdType != ExtendedMountIdentifierTypeDiskPath {
298
- partition , partitionIndex , verityMetadata , err = findExtendedPartition (mountIdType , mountId , partitions , buildDir )
299
- if err != nil {
300
- return ExtendedMountIdentifierTypeDefault , diskutils.PartitionInfo {}, 0 , nil , err
301
- }
286
+ partition , partitionIndex , verityMetadata , err := findExtendedPartition (mountIdType , mountId , partitions , buildDir )
287
+ if err != nil {
288
+ return ExtendedMountIdentifierTypeDefault , diskutils.PartitionInfo {}, 0 , nil , err
302
289
}
303
290
304
291
return mountIdType , partition , partitionIndex , verityMetadata , nil
@@ -677,16 +664,6 @@ func parseExtendedSourcePartition(source string) (ExtendedMountIdentifierType, s
677
664
return ExtendedMountIdentifierTypePartLabel , partLabel , nil
678
665
}
679
666
680
- // ToDo: Ignore when customize overlay / diskpath enabled base image.
681
- //
682
- if source == "overlay" {
683
- return ExtendedMountIdentifierTypeOverlay , "" , nil
684
- }
685
- _ , isDeviceCustom := strings .CutPrefix (source , "/dev/disk" )
686
- if isDeviceCustom {
687
- return ExtendedMountIdentifierTypeDiskPath , "" , nil
688
- }
689
-
690
667
if strings .HasPrefix (source , "/dev" ) {
691
668
return ExtendedMountIdentifierTypeDev , source , nil
692
669
}
0 commit comments