From 0ba810d43da3f16f92824d20f5605b0e776147e4 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Sat, 6 May 2023 12:32:04 +0530 Subject: livevm: split longer lines and update err message to show new options --- .local/bin/livevm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to '.local/bin/livevm') diff --git a/.local/bin/livevm b/.local/bin/livevm index 838977a..f52b45c 100755 --- a/.local/bin/livevm +++ b/.local/bin/livevm @@ -5,7 +5,8 @@ storage="${data_dir}/livevm.qcow2" # allocate half of available memory and cores to vm mem="$(($(grep MemAvailable /proc/meminfo | grep -o '[0-9]*')/2))" cores="$(($(nproc)/2))" -cmd="qemu-system-x86_64 -boot menu=on -enable-kvm -device intel-hda -device hda-duplex -m ${mem}k -cpu host -smp $cores -drive file=$storage" +cmd="qemu-system-x86_64 -boot menu=on -enable-kvm -device intel-hda \ + -device hda-duplex -m ${mem}k -cpu host -smp $cores -drive file=$storage" [ ! -d "${data_dir}" ] && mkdir -p "${data_dir}" @@ -66,7 +67,8 @@ do exit ;; ?) - printf "%s\n" "usage: ${0##*/} [ -weh ] [ -c cdrom ] [ -d drive ]" 1>&2 + printf "%s%s\n" "usage: ${0##*/} [ -weh ] [ -c cdrom ] [ -d drive ]" \ + "[ -u host_bus/host_addr ] [ -q img.qcow2 ] [ -r img.raw ]" 1>&2 exit 1 ;; esac -- cgit v1.2.3