summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsinanmohd <sinan@firemail.cc>2023-05-06 12:32:04 +0530
committersinanmohd <sinan@firemail.cc>2023-05-06 12:32:04 +0530
commit0ba810d43da3f16f92824d20f5605b0e776147e4 (patch)
treeb55963968a118a8ab98d984e8cc0df9611c18463
parentd2eb3db31f0ea17103786f055e19714e2039e143 (diff)
livevm: split longer lines and update err message to show new options
-rwxr-xr-x.local/bin/livevm6
1 files changed, 4 insertions, 2 deletions
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