mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-22 18:41:37 +00:00
Merge pull request #2194 from dave-tucker/fix-qemu-bug
linuxkit: Fix qemu run behaviour when file does not exist
This commit is contained in:
commit
425f37890d
@ -170,6 +170,9 @@ func runQemu(args []string) {
|
|||||||
|
|
||||||
// user not trying to boot off ISO or kernel, so assume booting from a disk image
|
// user not trying to boot off ISO or kernel, so assume booting from a disk image
|
||||||
if !*kernelBoot && !*isoBoot {
|
if !*kernelBoot && !*isoBoot {
|
||||||
|
if _, err := os.Stat(path); err != nil {
|
||||||
|
log.Fatalf("Boot disk image %s does not exist", path)
|
||||||
|
}
|
||||||
// currently no way to set format, but autodetect probably works
|
// currently no way to set format, but autodetect probably works
|
||||||
d := Disks{DiskConfig{Path: path}}
|
d := Disks{DiskConfig{Path: path}}
|
||||||
disks = append(d, disks...)
|
disks = append(d, disks...)
|
||||||
|
Loading…
Reference in New Issue
Block a user