We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b52dfef + 76bf08b commit 2e97ab2Copy full SHA for 2e97ab2
internal/server/instance/drivers/driver_qemu.go
@@ -2243,11 +2243,18 @@ func (d *qemu) setupNvram() error {
2243
return err
2244
}
2245
2246
+ nvramPath := d.nvramPath()
2247
+
2248
+ // Handle the case where the firmware vars filename matches our internal one.
2249
+ if efiVarsName == filepath.Base(nvramPath) {
2250
+ return nil
2251
+ }
2252
2253
// Generate a symlink.
2254
// This is so qemu.nvram can always be assumed to be the EDK2 vars file.
2255
// The real file name is then used to determine what firmware must be selected.
- _ = os.Remove(d.nvramPath())
- err = os.Symlink(efiVarsName, d.nvramPath())
2256
+ _ = os.Remove(nvramPath)
2257
+ err = os.Symlink(efiVarsName, nvramPath)
2258
if err != nil {
2259
2260
0 commit comments