bootdeploy: add context to kernel copy fd close error (MR 33)

This commit is contained in:
Clayton Craft
2023-03-05 22:59:07 -08:00
parent 307fb1889f
commit d03257981f

View File

@@ -2,6 +2,7 @@ package bootdeploy
import ( import (
"errors" "errors"
"fmt"
"io" "io"
"log" "log"
"os" "os"
@@ -79,7 +80,7 @@ func bootDeploy(workDir string, outDir string) error {
return err return err
} }
if err := kernFileCopy.Close(); err != nil { if err := kernFileCopy.Close(); err != nil {
return err return fmt.Errorf("error closing %s: %w", kernFilename, err)
} }
// boot-deploy -i initramfs -k vmlinuz-postmarketos-rockchip -d /tmp/cpio -o /tmp/foo initramfs-extra // boot-deploy -i initramfs -k vmlinuz-postmarketos-rockchip -d /tmp/cpio -o /tmp/foo initramfs-extra