vmspawn: fix --smbios
The file used to pass credentials gets created and then immediately deleted:
$ systemd-vmspawn -i image.raw -s "io.systemd.credential.binary:tty.serial.hvc0.agetty.autologin=cm9vdA=="
░ Spawning VM opensuse-2025081621.1 on /tmp/image.raw.
░ Press Ctrl-] three times within 1s to kill VM.
Not overwriting existing state file.
Listening on /run/user/1000/systemd/vmspawn.1c00857c6a3dc2c7/tpm.sock as 3.
qemu-system-x86_64: -smbios type=11,path=/var/tmp/vmspawn-smbios-Hizb4A/.#smbios11e5a842e77d7b4b68: Could not open '/var/tmp/vmspawn-smbios-Hizb4A/.#smbios11e5a842e77d7b4b68': No such file or directory
Follow-up for a79e94aa58
This commit is contained in:
committed by
Yu Watanabe
parent
d92990c783
commit
d9c23bcfc4
@@ -1128,6 +1128,8 @@ static int cmdline_add_smbios11(char ***cmdline, const char* smbios_dir) {
|
||||
|
||||
if (strv_extendf(cmdline, "type=11,path=%s", p) < 0)
|
||||
return log_oom();
|
||||
|
||||
p = mfree(p);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user