Skip to content

Commit

Permalink
Move .build.cmdline handling into vm_fixup_kvm
Browse files Browse the repository at this point in the history
The .build.console handling is already there and it makes no sense
to have it in the code that does the kernel/initrd copying.
  • Loading branch information
mlschroe committed Dec 1, 2023
1 parent 15d547f commit 5eac7a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 0 additions & 3 deletions build-vm
Original file line number Diff line number Diff line change
Expand Up @@ -1083,9 +1083,6 @@ vm_first_stage() {
if test -f "$BUILD_ROOT/.build.initrd.$vm_type" -a ! -L "$BUILD_ROOT/.build.initrd.$vm_type" ; then
cp "$BUILD_ROOT/.build.initrd.$vm_type" "$KERNEL_TEMP_DIR/initrd"
fi
if test -f "$BUILD_ROOT/.build.cmdline.$vm_type" -a ! -L "$BUILD_ROOT/.build.cmdline.$vm_type" ; then
vm_cmdline="$(cat $BUILD_ROOT/.build.cmdline.$vm_type)"
fi
fi
check_exit
if test -n "$VM_USE_MKFS_COPYIN" ; then
Expand Down
4 changes: 4 additions & 0 deletions build-vm-kvm
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,10 @@ vm_fixup_kvm() {
fi
fi

if test -z "$VM_KERNEL" -a -z "$VM_CMDLINE" -a -f "$BUILD_ROOT/.build.cmdline.$vm_type" -a ! -L "$BUILD_ROOT/.build.cmdline.$vm_type" ; then
vm_cmdline="$(cat $BUILD_ROOT/.build.cmdline.$vm_type)"
fi

# move IO into separate I/O thread for some architectures
if test "${kvm_device%%-*}" = "virtio" ; then
if $kvm_bin -version | grep -F -q 7.1.0; then
Expand Down

0 comments on commit 5eac7a6

Please sign in to comment.