Skip to content

Commit fa54a7f

Browse files
author
olevole
committed
fix dialog geometry
1 parent 4e3f071 commit fa54a7f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tools/vm-cpu-topology-tui

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ dialog_menu_main()
2020
local sqldelimer=" "
2121

2222
local mark
23-
2423
local menu_list=$( cbsdsqlro local "SELECT name,sockets,cores,threads FROM vm_cpu_topology" | while read name sockets cores threads; do
2524
eval mark=\$topology_selected_${name}
2625
if [ "${mark}" = "1" ]; then
@@ -31,6 +30,7 @@ dialog_menu_main()
3130
echo "'${name}' '[${mark}] Sockets=${sockets},Cores=${cores},Threads=${threads}' 'description'"
3231
done ) || err 1 "${N1_COLOR}Error while create topology map${N0_COLOR}"
3332

33+
3434
[ -z "${menu_list}" ] && menu_list="'' 'no data' ''"
3535

3636
local height width rows
@@ -43,6 +43,9 @@ dialog_menu_main()
4343

4444
height=$(( height + 1 ))
4545

46+
# when empty form
47+
[ $width -lt 42 ] && width=42
48+
4649
# Obtain default-item from previously stored selection
4750
f_dialog_default_fetch defaultitem
4851

@@ -183,7 +186,7 @@ get_construct_vm_cpu_topology_name()
183186
validate_jname "${_input}"
184187
case $? in
185188
0)
186-
_res=$( cbsdsqlro local "SELECT id FROM vm_cpu_topology WHERE name=\"${_input}\" LIMIT 1" )
189+
_res=$( cbsdsqlro local "SELECT id FROM vm_cpu_topology WHERE name='${_input}' LIMIT 1" )
187190
if [ -n "${_res}" ]; then
188191
_message="ERROR: topology ${_input} already exist"
189192
else

0 commit comments

Comments
 (0)