Skip to content

Commit

Permalink
Merge branch 'snapcore:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Meulengracht authored Jan 5, 2022
2 parents b41ad8b + b426a3f commit 5a72bb6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions spread/qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,15 @@ func systemPath(system *System) string {

func biosPath(biosName string) (string, error) {
bios := os.ExpandEnv("$HOME/.spread/qemu/bios/" + biosName + ".img")
if info, err := os.Stat(biosName); err == nil && info.Mode().IsRegular() {
if info, err := os.Stat(bios); err == nil && info.Mode().IsRegular() {
debugf("using local bios file: %v", bios)
return bios, nil
}

if p := os.Getenv("SPREAD_QEMU_FALLBACK_BIOS_PATH"); p != "" {
return os.ExpandEnv(filepath.Join(p, biosName+".img")), nil
fallbackBios := os.ExpandEnv(filepath.Join(p, biosName+".img"))
debugf("using fallback bios file: %v", fallbackBios)
return fallbackBios, nil
}

switch biosName {
Expand Down

0 comments on commit 5a72bb6

Please sign in to comment.