diff --git a/pkg/uefi/firmwarevolume.go b/pkg/uefi/firmwarevolume.go index d6ed046a..a91fe875 100644 --- a/pkg/uefi/firmwarevolume.go +++ b/pkg/uefi/firmwarevolume.go @@ -165,7 +165,11 @@ func (fv *FirmwareVolume) InsertFile(alignedOffset uint64, fBuf []byte) error { // Check size fLen := uint64(len(fBuf)) if fLen == 0 { - return errors.New("trying to insert empty file") + if true { + return nil + } else { + return errors.New("trying to insert empty file") + } } // Overwrite old data in the firmware volume. fv.buf = append(fv.buf, fBuf...) diff --git a/pkg/visitors/assemble.go b/pkg/visitors/assemble.go index 3ca15eb8..61b4b822 100644 --- a/pkg/visitors/assemble.go +++ b/pkg/visitors/assemble.go @@ -80,8 +80,9 @@ func (v *Assemble) Visit(f uefi.Firmware) error { for _, file := range f.Files { fileBuf := file.Buf() fileLen := uint64(len(fileBuf)) + log.Warnf("adding %v ", file.Header.GUID) if fileLen == 0 { - log.Fatalf("%v", file.Header.GUID) + log.Warnf("%v empty?", file.Header.GUID) } // Pad to the 8 byte alignments.