boot-img: better error

This commit is contained in:
Mikaël Cluseau 2019-02-28 10:15:35 +11:00
parent 908ff595a3
commit d2b212ae6b

View File

@ -3,6 +3,7 @@ package main
import ( import (
"archive/tar" "archive/tar"
"compress/gzip" "compress/gzip"
"fmt"
"io" "io"
"io/ioutil" "io/ioutil"
"log" "log"
@ -107,7 +108,7 @@ func setupBootImage(bootImg *os.File, ctx *renderContext) (err error) {
err = syscall.Mount(dev+"p1", tempDir, "vfat", 0, "") err = syscall.Mount(dev+"p1", tempDir, "vfat", 0, "")
if err != nil { if err != nil {
return return fmt.Errorf("failed to mount %s to %s: %v", dev+"p1", tempDir, err)
} }
defer func() { defer func() {