We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb7316b commit 76bf08bCopy full SHA for 76bf08b
internal/server/instance/drivers/driver_qemu.go
@@ -2220,11 +2220,18 @@ func (d *qemu) setupNvram() error {
2220
return err
2221
}
2222
2223
+ nvramPath := d.nvramPath()
2224
+
2225
+ // Handle the case where the firmware vars filename matches our internal one.
2226
+ if efiVarsName == filepath.Base(nvramPath) {
2227
+ return nil
2228
+ }
2229
2230
// Generate a symlink.
2231
// This is so qemu.nvram can always be assumed to be the EDK2 vars file.
2232
// The real file name is then used to determine what firmware must be selected.
- _ = os.Remove(d.nvramPath())
- err = os.Symlink(efiVarsName, d.nvramPath())
2233
+ _ = os.Remove(nvramPath)
2234
+ err = os.Symlink(efiVarsName, nvramPath)
2235
if err != nil {
2236
2237
0 commit comments