Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/cbsdPublic

Commit60511c1

Browse files
author
Oleg Ginzburg
committed
bsetup: set vm_iso_path2=0 when empty
1 parent0b8af05 commit60511c1

File tree

1 file changed

+22
-18
lines changed

1 file changed

+22
-18
lines changed

‎bhyvectl/bsetup-tui‎

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -48,24 +48,28 @@ commit()
4848
eval VAL=\$$i
4949
eval OVAL=\$OLDVAL_${i}
5050

51-
if [ "${i}" = "jname" ]; then
52-
_oldjname="${OVAL}"
53-
_newjname="${VAL}"
54-
continue
55-
fi
56-
57-
if [ "${i}" = "vm_ram" ]; then
58-
# In SQLite3 we store vm_ram in bytes, convert it
59-
# test for human
60-
if is_number ${VAL}; then
61-
if conv2bytes ${VAL}; then
62-
VAL="${convval}"
51+
case "${i}" in
52+
jname)
53+
_oldjname="${OVAL}"
54+
_newjname="${VAL}"
55+
continue
56+
;;
57+
vm_ram)
58+
# In SQLite3 we store vm_ram in bytes, convert it
59+
# test for human
60+
if is_number ${VAL}; then
61+
if conv2bytes ${VAL}; then
62+
VAL="${convval}"
63+
fi
64+
else
65+
# Assume than user input in MB, so convert to bytes
66+
VAL=$(( convval * 1024 * 1024 ))
6367
fi
64-
else
65-
# Assume than user input in MB, so convert to bytes
66-
VAL=$(( convval * 1024 * 1024 ))
67-
fi
68-
fi
68+
;;
69+
vm_iso_path2)
70+
[ -z "${VAL}" ] && VAL="0"
71+
;;
72+
esac
6973

7074
[ "${VAL}" = "${OVAL}" ] && continue
7175

@@ -295,7 +299,7 @@ while [ 1 ]; do
295299
"COMMIT")
296300
commit
297301
;;
298-
astart|protectedbhyve_generate_acpi|bhyve_wire_memory|bhyve_rts_keeps_utc|bhyve_force_msi_irq|bhyve_x2apic_mode|bhyve_mptable_gen|bhyve_ignore_msr_acc|xhci|tablet|fbuf|jailed|chrooted|double_acpi|virtio_rnd)
302+
astart|protected|bhyve_generate_acpi|bhyve_wire_memory|bhyve_rts_keeps_utc|bhyve_force_msi_irq|bhyve_x2apic_mode|bhyve_mptable_gen|bhyve_ignore_msr_acc|xhci|tablet|fbuf|jailed|chrooted|double_acpi|virtio_rnd)
299303
invert_checkbox ${mychoice}
300304
continue
301305
;;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp