github.com/linuxboot/fiano@v1.2.0/pkg/intel/metadata/fit/ent_diagnostic_acm.go (about)

     1  // Copyright 2017-2021 the LinuxBoot Authors. All rights reserved
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package fit
     6  
     7  import (
     8  	"fmt"
     9  	"io"
    10  )
    11  
    12  // EntryDiagnosticACM represents a FIT entry of type "Diagnostic ACM" (0x03)
    13  type EntryDiagnosticACM struct{ EntryBase }
    14  
    15  var _ EntryCustomGetDataSegmentSizer = (*EntryDiagnosticACM)(nil)
    16  
    17  // Init initializes the entry using EntryHeaders and firmware image.
    18  func (entry *EntryDiagnosticACM) CustomGetDataSegmentSize(firmware io.ReadSeeker) (uint64, error) {
    19  	return 0, fmt.Errorf("EntryDiagnosticACM is not supported, yet")
    20  }
    21  
    22  var _ EntryCustomRecalculateHeaderser = (*EntryDiagnosticACM)(nil)
    23  
    24  // CustomRecalculateHeaders recalculates metadata to be consistent with data.
    25  // For example, it fixes checksum, data size, entry type and so on.
    26  func (entry *EntryDiagnosticACM) CustomRecalculateHeaders() error {
    27  	return fmt.Errorf("EntryDiagnosticACM is not supported, yet")
    28  }