• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Virtual machine Management Terminal User Interface


Commit MetaInfo

Revisiona08e482005bcc042c91e7022d6a0135778f2883e (tree)
Time2023-07-02 21:21:36
AuthorKoine Yuusuke(koinec) <koinec@user...>
CommiterKoine Yuusuke(koinec)

Log Message

WorkBackup

Change Summary

Incremental Difference

--- a/src/tuicmd.c
+++ b/src/tuicmd.c
@@ -52,7 +52,13 @@ int
5252 mvwprintw( gp_cmd_win, 0, 0, "%s => ", pstr_prompt );
5353
5454 i_mode = TuiKey_GetMode();
55- if( TUIKEY_MODE_INPUTSTR == i_mode ) {
55+ if( TUIKEY_MODE_INPUTPASSWD == i_mode ) {
56+ pstr_input = TuiKey_GetInputStringAndPasswd( &i_len, NULL );
57+ str_pass[ i_len-- ] = '\0';
58+ for( ; 0 <= i_len; i_len-- ) { str_pass[ i_len ] = '*'; }
59+ wprintw( gp_cmd_win, "%s", str_pass );
60+ }
61+ else if( TUIKEY_MODE_INPUTSTR & i_mode ) {
5662 getyx( gp_cmd_win, i_row, i_start );
5763
5864 pstr_input = TuiKey_GetInputStringAndPasswd( NULL, &i_cursor );
@@ -60,12 +66,6 @@ int
6066
6167 wmove( gp_cmd_win, i_row, i_start + i_cursor );
6268 }
63- else if( TUIKEY_MODE_INPUTPASSWD == i_mode ) {
64- pstr_input = TuiKey_GetInputStringAndPasswd( &i_len, NULL );
65- str_pass[ i_len-- ] = '\0';
66- for( ; 0 <= i_len; i_len-- ) { str_pass[ i_len ] = '*'; }
67- wprintw( gp_cmd_win, "%s", str_pass );
68- }
6969
7070 touchwin( gp_cmd_win );
7171 wnoutrefresh( gp_cmd_win );
--- a/src/tuiguest.c
+++ b/src/tuiguest.c
@@ -74,6 +74,7 @@ int
7474 TuiGuest_InputItem(
7575 void )
7676 {
77+ int i_mode;
7778 Guest *p_guest;
7879 KeyVal_Data t_val;
7980 TuiGuest_LineAttr t_attr;
@@ -81,7 +82,10 @@ int
8182 TextBuf_GetLine( &lt_guest.t_textbuf,
8283 lt_guest.i_now_line, (void *)&t_attr );
8384
84- if( '\0' == t_attr.str_key[0] ) { goto goto_TuiGuest_InputItem_post; }
85+ if( TUIGUEST_LINE_EDITABLE != ( TUIGUEST_LINE_EDITABLE & t_attr.dw_option ))
86+ { goto goto_TuiGuest_InputItem_post; }
87+
88+ //if( '\0' == t_attr.str_key[0] ) { goto goto_TuiGuest_InputItem_post; }
8589
8690 p_guest = Guest_Ref( lt_guest.i_guest );
8791 if( NULL == p_guest ) { goto goto_TuiGuest_InputItem_post; }
@@ -90,8 +94,19 @@ int
9094
9195 Guest_Release( p_guest );
9296
97+ if( TUIGUEST_LINE_PASSWORD == (TUIGUEST_LINE_PASSWORD & t_attr.dw_option) )
98+ { i_mode = TUIKEY_MODE_INPUTPASSWD; }
99+ else if( TUIGUEST_LINE_IPADDR == (TUIGUEST_LINE_IPADDR & t_attr.dw_option) )
100+ { ErrInfo_DebugMsg( "ipaddr" );i_mode = TUIKEY_MODE_INPUTIPADDR; }
101+ else if( TUIGUEST_LINE_DECIMAL == (TUIGUEST_LINE_DECIMAL & t_attr.dw_option) )
102+ { i_mode = TUIKEY_MODE_INPUTDECIMAL; }
103+ else if( TUIGUEST_LINE_INTEGER == (TUIGUEST_LINE_INTEGER & t_attr.dw_option) )
104+ { i_mode = TUIKEY_MODE_INPUTINTEGER; }
105+ else
106+ { i_mode = TUIKEY_MODE_INPUTSTR; }
107+
93108 if( IS_KEYVAL_TYPE_STRING( t_val ) ) {
94- TuiKey_ChangeMode( TUIKEY_MODE_INPUTSTR, REQUEST_CMD_NONE,
109+ TuiKey_ChangeMode( i_mode, REQUEST_CMD_NONE,
95110 HVISOR_ID_NONE, lt_guest.i_guest,
96111 TuiGuest_InputString, 0x00, TUIKEY_MODE_INFO,
97112 "Input Value:", KEYVAL_DATA_STRING(t_val), KEYVAL_MAXLEN_STRVAL );
@@ -156,6 +171,32 @@ int
156171
157172 /* ===========================================================================*/
158173 int
174+ TuiGuest_AppendLine(
175+ char *pstr_line,
176+ char *pstr_key,
177+ int i_attr,
178+ DWord dw_option,
179+ ConfFile_SelectValue *pt_select,
180+ ConfFile_CheckValue pf_check )
181+{
182+ TuiGuest_LineAttr t_attr;
183+
184+ t_attr.i_attr = i_attr;
185+ t_attr.dw_option = dw_option;
186+ t_attr.pt_select = pt_select;
187+ t_attr.pf_check = pf_check;
188+ if( NULL != pstr_key )
189+ { strncpy( t_attr.str_key, pstr_key, sizeof( t_attr.str_key ) ); }
190+ else
191+ { t_attr.str_key[0] = '\0'; }
192+
193+ TextBuf_AppendLine( &lt_guest.t_textbuf, pstr_line, 0, (void *)&t_attr );
194+
195+ return 0x00;
196+}
197+
198+/* ===========================================================================*/
199+int
159200 TuiGuest_OutputLine(
160201 KeyVal_Info *pt_kvinfo,
161202 char *pstr_title,
@@ -163,23 +204,20 @@ int
163204 Byte b_level,
164205 char *pstr_unit,
165206 int i_attr,
166- DWord dw_option )
207+ DWord dw_option,
208+ ConfFile_SelectValue *pt_select,
209+ ConfFile_CheckValue pf_check )
167210 {
168211 int i_err;
169212 char str_temp[128];
170213 char str_format[32];
171214 KeyVal_Data t_kval;
172- TuiGuest_LineAttr t_attr;
173215 int i_len;
174216 int i_fmt;
175217
176218 i_len = sizeof( str_temp );
177219 i_fmt = sizeof( str_format );
178220
179- t_attr.i_attr = i_attr;
180- t_attr.dw_option = dw_option;
181- strncpy( t_attr.str_key, pstr_key, sizeof( t_attr.str_key ) );
182-
183221 i_err = KeyVal_GetData( &t_kval, pt_kvinfo, pstr_key );
184222 if( 0x00 != i_err ) {
185223 return -0x01;
@@ -236,7 +274,7 @@ int
236274 if( NULL != pstr_unit )
237275 { strncat( str_temp, pstr_unit, i_len ); }
238276
239- TextBuf_AppendLine( &lt_guest.t_textbuf, str_temp, 0, (void *)&t_attr );
277+ TuiGuest_AppendLine( str_temp, pstr_key, i_attr, dw_option, pt_select, pf_check );
240278
241279 return 0x00;
242280 }
@@ -249,6 +287,7 @@ int
249287 int i_err;
250288 int i_cnt;
251289 int i_max;
290+ int i_attr;
252291 char str_temp[128];
253292 char str_key[KEYVAL_MAXLEN_KEY];
254293 KeyVal_Data t_kval;
@@ -266,85 +305,77 @@ int
266305 assert( NULL != p_guest );
267306
268307 // VM name ---
269- t_attr.str_key[0] = '\0';
270- t_attr.i_attr = A_BOLD;
271- t_attr.dw_option = TUIGUEST_LINEATTR_ONLYVALUE;
272308 snprintf( str_temp, sizeof( str_temp ), " %-22s: %-40s", "VM name", p_guest->str_vmname );
273- TextBuf_AppendLine( &lt_guest.t_textbuf, str_temp, 0, (void *)&t_attr );
309+ TuiGuest_AppendLine( str_temp, NULL, A_BOLD, TUIGUEST_LINEATTR_ONLYVALUE, NULL, NULL );
274310
275- t_attr.i_attr = 0x00;
276- t_attr.dw_option = TUIGUEST_LINEATTR_NORMAL;
277- TextBuf_AppendLine( &lt_guest.t_textbuf, "", 0, NULL );
311+ TuiGuest_AppendLine( "", NULL, 0x00, TUIGUEST_LINEATTR_NORMAL, NULL, NULL ); // Empty line
278312
279313 // Status Section ----
280- t_attr.i_attr = COL_CYAN | A_BOLD;
281- t_attr.dw_option = TUIGUEST_LINEATTR_NORMAL;
282- TextBuf_AppendLine( &lt_guest.t_textbuf, "Running Information", 0, (void *)&t_attr );
314+ TuiGuest_AppendLine( "Running Information", NULL, COL_CYAN|A_BOLD,
315+ TUIGUEST_LINEATTR_NORMAL, NULL, NULL );
283316
284- t_attr.i_attr = 0x00;
285- t_attr.dw_option = TUIGUEST_LINEATTR_NORMAL;
317+ i_attr = 0x00;
286318 switch( p_guest->dw_status ) {
287319 case GUEST_STATUS_STOP:
288320 snprintf( str_temp, sizeof( str_temp ), " %-22s: %-40s", "Status", " Stop" );
289321 break;
290322 case GUEST_STATUS_RUN:
323+ i_attr = COL_CYAN | A_BOLD;
291324 snprintf( str_temp, sizeof( str_temp ), " %-22s: %-40s", "Status", "* RUNNING" );
292- t_attr.i_attr = COL_CYAN | A_BOLD;
293- t_attr.dw_option = TUIGUEST_LINEATTR_ONLYVALUE;
294325 break;
295326 case GUEST_STATUS_WAIT:
327+ i_attr = COL_YELLOW | A_BOLD;
296328 snprintf( str_temp, sizeof( str_temp ), " %-22s: %-40s", "Status", "- Waiting" );
297- t_attr.i_attr = COL_YELLOW | A_BOLD;
298- t_attr.dw_option = TUIGUEST_LINEATTR_ONLYVALUE;
299329 break;
300330 case GUEST_STATUS_UNKNOWN:
301- t_attr.i_attr = COL_MAGENTA | A_BOLD;
302- t_attr.dw_option = TUIGUEST_LINEATTR_ONLYVALUE;
331+ i_attr = COL_MAGENTA | A_BOLD;
303332 snprintf( str_temp, sizeof( str_temp ), " %-22s: %-40s", "Status", "? Unknown" );
304333 break;
305334 default:
306- t_attr.i_attr = COL_RED | A_BOLD;
307- t_attr.dw_option = TUIGUEST_LINEATTR_ONLYVALUE;
335+ i_attr = COL_RED | A_BOLD;
308336 snprintf( str_temp, sizeof( str_temp ), " %-22s: %-40s", "Status", "! BUG!!" );
309337 break;
310338 }
311- TextBuf_AppendLine( &lt_guest.t_textbuf, str_temp, 0, (void *)&t_attr );
339+ TuiGuest_AppendLine( str_temp, NULL, i_attr, TUIGUEST_LINEATTR_ONLYVALUE, NULL, NULL );
312340
313- t_attr.i_attr = 0x00;
314- t_attr.dw_option = TUIGUEST_LINEATTR_NORMAL;
315- TextBuf_AppendLine( &lt_guest.t_textbuf, "", 0, NULL );
341+ TuiGuest_AppendLine( "", NULL, 0x00, TUIGUEST_LINEATTR_NORMAL, NULL, NULL ); // Empty line
316342
317343 // Configuration Section ----
318- t_attr.i_attr = COL_CYAN | A_BOLD;
319- TextBuf_AppendLine( &lt_guest.t_textbuf, "Configuration", 0, (void *)&t_attr );
344+ TuiGuest_AppendLine( "Configuration", NULL, COL_CYAN|A_BOLD,
345+ TUIGUEST_LINEATTR_NORMAL, NULL, NULL );
320346
321347 // Loader --
322- t_attr.i_attr = A_BOLD;
323- TextBuf_AppendLine( &lt_guest.t_textbuf, " Loader:", 0, (void *)&t_attr );
348+ TuiGuest_AppendLine( " Loader:", NULL, A_BOLD, TUIGUEST_LINEATTR_NORMAL, NULL, NULL );
324349
325- TuiGuest_OutputLine( &(p_guest->t_info), "Loader", GUEST_LOADER_LOADER_KEY, 1, NULL, 0x00, 0x00 );
326- TuiGuest_OutputLine( &(p_guest->t_info), "BhyveLoader", GUEST_LOADER_BHYVELOADER_KEY, 1, NULL, 0x00, 0x00 );
327- TuiGuest_OutputLine( &(p_guest->t_info), "TimeOut", GUEST_LOADER_TIMEOUT_KEY, 1, "sec", 0x00, 0x00 );
350+ TuiGuest_OutputLine( &(p_guest->t_info), "Loader", GUEST_LOADER_LOADER_KEY, 1,
351+ NULL, 0x00, 0x00, NULL, NULL );
352+ TuiGuest_OutputLine( &(p_guest->t_info), "BhyveLoader", GUEST_LOADER_BHYVELOADER_KEY, 1,
353+ NULL, 0x00, 0x00, NULL, NULL );
354+ TuiGuest_OutputLine( &(p_guest->t_info), "TimeOut", GUEST_LOADER_TIMEOUT_KEY, 1,
355+ "sec", 0x00, 0x00, NULL, NULL );
328356
329357 // CPU --
330- t_attr.i_attr = A_BOLD;
331- TextBuf_AppendLine( &lt_guest.t_textbuf, " CPU:", 0, (void *)&t_attr );
358+ TuiGuest_AppendLine( " CPU:", NULL, A_BOLD, TUIGUEST_LINEATTR_NORMAL, NULL, NULL );
332359
333- TuiGuest_OutputLine( &(p_guest->t_info), "CPUs", GUEST_CPU_VCPUS_KEY, 1, "cpu", 0x00, 0x00 );
334- TuiGuest_OutputLine( &(p_guest->t_info), "Sockets", GUEST_CPU_SOCKETS_KEY, 1, "socket", 0x00, 0x00 );
335- TuiGuest_OutputLine( &(p_guest->t_info), "Cores", GUEST_CPU_CORES_KEY, 1, "core", 0x00, 0x00 );
336- TuiGuest_OutputLine( &(p_guest->t_info), "Threads", GUEST_CPU_THREADS_KEY, 1, "thread", 0x00, 0x00 );
360+ TuiGuest_OutputLine( &(p_guest->t_info), "CPUs", GUEST_CPU_VCPUS_KEY, 1,
361+ "cpu", 0x00, 0x00, NULL, NULL );
362+ TuiGuest_OutputLine( &(p_guest->t_info), "Sockets", GUEST_CPU_SOCKETS_KEY, 1,
363+ "socket", 0x00, 0x00, NULL, NULL );
364+ TuiGuest_OutputLine( &(p_guest->t_info), "Cores", GUEST_CPU_CORES_KEY, 1,
365+ "core", 0x00, 0x00, NULL, NULL );
366+ TuiGuest_OutputLine( &(p_guest->t_info), "Threads", GUEST_CPU_THREADS_KEY, 1,
367+ "thread", 0x00, 0x00, NULL, NULL );
337368
338369 // Memory --
339- t_attr.i_attr = A_BOLD;
340- TextBuf_AppendLine( &lt_guest.t_textbuf, " Memory:", 0, (void *)&t_attr );
370+ TuiGuest_AppendLine( " Memory:", NULL, A_BOLD, TUIGUEST_LINEATTR_NORMAL, NULL, NULL );
341371
342- TuiGuest_OutputLine( &(p_guest->t_info), "Size", GUEST_MEM_SIZE_KEY, 1, "KByte", 0x00, 0x00 );
343- TuiGuest_OutputLine( &(p_guest->t_info), "Wired", GUEST_MEM_WIRED_KEY, 1, NULL, 0x00, 0x00 );
372+ TuiGuest_OutputLine( &(p_guest->t_info), "Size", GUEST_MEM_SIZE_KEY, 1,
373+ "KByte", 0x00, 0x00, NULL, NULL );
374+ TuiGuest_OutputLine( &(p_guest->t_info), "Wired", GUEST_MEM_WIRED_KEY, 1,
375+ NULL, 0x00, 0x00, NULL, NULL );
344376
345377 // Network --
346- t_attr.i_attr = A_BOLD;
347- TextBuf_AppendLine( &lt_guest.t_textbuf, " Network:", 0, (void *)&t_attr );
378+ TuiGuest_AppendLine( " Network:", NULL, A_BOLD, TUIGUEST_LINEATTR_NORMAL, NULL, NULL );
348379
349380 i_err = KeyVal_GetData( &t_kval, &p_guest->t_info, GUEST_NETWORK_ITEMS_KEY );
350381 if( 0x00 != i_err ) { goto goto_TuiGuest_GeneratePageText_skipNetwork; }
@@ -352,217 +383,275 @@ int
352383
353384 i_max = KEYVAL_DATA_INT( t_kval );
354385 for( i_cnt = 0; i_cnt < i_max; i_cnt++ ) {
355- t_attr.i_attr = 0x00;
356386 snprintf( str_temp, sizeof( str_temp ), " Network #%d:", i_cnt );
357- TextBuf_AppendLine( &lt_guest.t_textbuf, str_temp, 0, NULL );
387+ TuiGuest_AppendLine( str_temp, NULL, 0x00, TUIGUEST_LINEATTR_NORMAL, NULL, NULL );
358388
359389 snprintf( str_key, sizeof( str_key ), GUEST_NETWORK_BASEKEY"/%d/%s",
360390 i_cnt, GUEST_NETWORK_TYPE_SUBKEY );
361- TuiGuest_OutputLine( &(p_guest->t_info), "Type", str_key, 2, NULL, 0x00, 0x00 );
391+ TuiGuest_OutputLine( &(p_guest->t_info), "Type", str_key, 2,
392+ NULL, 0x00, 0x00, NULL, NULL );
362393
363394 snprintf( str_key, sizeof( str_key ), GUEST_NETWORK_BASEKEY"/%d/%s",
364395 i_cnt, GUEST_NETWORK_SWITCH_SUBKEY );
365- TuiGuest_OutputLine( &(p_guest->t_info), "Switch", str_key, 2, NULL, 0x00, 0x00 );
396+ TuiGuest_OutputLine( &(p_guest->t_info), "Switch", str_key, 2,
397+ NULL, 0x00, 0x00, NULL, NULL );
366398
367399 snprintf( str_key, sizeof( str_key ), GUEST_NETWORK_BASEKEY"/%d/%s",
368400 i_cnt, GUEST_NETWORK_DEVICE_SUBKEY );
369- TuiGuest_OutputLine( &(p_guest->t_info), "Device", str_key, 2, NULL, 0x00, 0x00 );
401+ TuiGuest_OutputLine( &(p_guest->t_info), "Device", str_key, 2,
402+ NULL, 0x00, 0x00, NULL, NULL );
370403
371404 snprintf( str_key, sizeof( str_key ), GUEST_NETWORK_BASEKEY"/%d/%s",
372405 i_cnt, GUEST_NETWORK_MAC_SUBKEY );
373- TuiGuest_OutputLine( &(p_guest->t_info), "MAC address", str_key, 2, NULL, 0x00, 0x00 );
406+ TuiGuest_OutputLine( &(p_guest->t_info), "MAC address", str_key, 2,
407+ NULL, 0x00, 0x00, NULL, NULL );
374408
375409 snprintf( str_key, sizeof( str_key ), GUEST_NETWORK_BASEKEY"/%d/%s",
376410 i_cnt, GUEST_NETWORK_SPAN_SUBKEY );
377- TuiGuest_OutputLine( &(p_guest->t_info), "SPAN", str_key, 2, NULL, 0x00, 0x00 );
411+ TuiGuest_OutputLine( &(p_guest->t_info), "SPAN", str_key, 2,
412+ NULL, 0x00, 0x00, NULL, NULL );
378413 }
379414
380415 goto_TuiGuest_GeneratePageText_skipNetwork:
381416
382417 // Disk --
383- t_attr.i_attr = A_BOLD;
384- TextBuf_AppendLine( &lt_guest.t_textbuf, " Disk:", 0, (void *)&t_attr );
418+ TuiGuest_AppendLine( " Disk:", NULL, A_BOLD, TUIGUEST_LINEATTR_NORMAL, NULL, NULL );
385419
386420 i_err = KeyVal_GetData( &t_kval, &p_guest->t_info, GUEST_DISK_ITEMS_KEY );
387- if( 0x00 != i_err ) { goto goto_TuiGuest_GeneratePageText_skipDisk; }
388- if( 0 == KEYVAL_DATA_INT( t_kval ) ) { goto goto_TuiGuest_GeneratePageText_skipDisk; }
421+ if( 0x00 != i_err )
422+ { goto goto_TuiGuest_GeneratePageText_skipDisk; }
423+ if( 0 == KEYVAL_DATA_INT( t_kval ) )
424+ { goto goto_TuiGuest_GeneratePageText_skipDisk; }
389425
390426 i_max = KEYVAL_DATA_INT( t_kval );
391427 for( i_cnt = 0; i_cnt < i_max; i_cnt++ ) {
392- t_attr.i_attr = 0x00;
393428 snprintf( str_temp, sizeof( str_temp ), " Disk #%d:", i_cnt );
394- TextBuf_AppendLine( &lt_guest.t_textbuf, str_temp, 0, NULL );
429+ TuiGuest_AppendLine( str_temp, NULL, 0x00, TUIGUEST_LINEATTR_NORMAL, NULL, NULL );
395430
396431 snprintf( str_key, sizeof( str_key ), GUEST_DISK_BASEKEY"/%d/%s",
397432 i_cnt, GUEST_DISK_TYPE_SUBKEY );
398- TuiGuest_OutputLine( &(p_guest->t_info), "Type", str_key, 2, NULL, 0x00, 0x00 );
433+ TuiGuest_OutputLine( &(p_guest->t_info), "Type", str_key, 2,
434+ NULL, 0x00, 0x00, NULL, NULL );
399435
400436 snprintf( str_key, sizeof( str_key ), GUEST_DISK_BASEKEY"/%d/%s",
401437 i_cnt, GUEST_DISK_NAME_SUBKEY );
402- TuiGuest_OutputLine( &(p_guest->t_info), "Name", str_key, 2, NULL, 0x00, 0x00 );
438+ TuiGuest_OutputLine( &(p_guest->t_info), "Name", str_key, 2,
439+ NULL, 0x00, 0x00, NULL, NULL );
403440
404441 snprintf( str_key, sizeof( str_key ), GUEST_DISK_BASEKEY"/%d/%s",
405442 i_cnt, GUEST_DISK_DEVICE_SUBKEY );
406- TuiGuest_OutputLine( &(p_guest->t_info), "Device", str_key, 2, NULL, 0x00, 0x00 );
443+ TuiGuest_OutputLine( &(p_guest->t_info), "Device", str_key, 2,
444+ NULL, 0x00, 0x00, NULL, NULL );
407445
408446 snprintf( str_key, sizeof( str_key ), GUEST_DISK_BASEKEY"/%d/%s",
409447 i_cnt, GUEST_DISK_OPTION_SUBKEY );
410- TuiGuest_OutputLine( &(p_guest->t_info), "Option", str_key, 2, NULL, 0x00, 0x00 );
448+ TuiGuest_OutputLine( &(p_guest->t_info), "Option", str_key, 2,
449+ NULL, 0x00, 0x00, NULL, NULL );
411450
412451 snprintf( str_key, sizeof( str_key ), GUEST_NETWORK_BASEKEY"/%d/%s",
413452 i_cnt, GUEST_DISK_SIZE_SUBKEY );
414- TuiGuest_OutputLine( &(p_guest->t_info), "Size", str_key, 2, NULL, 0x00, 0x00 );
453+ TuiGuest_OutputLine( &(p_guest->t_info), "Size", str_key, 2,
454+ NULL, 0x00, 0x00, NULL, NULL );
415455 }
416456
417457 goto_TuiGuest_GeneratePageText_skipDisk:
418458
419459 // Graphics (VNC) --
420460 i_err = KeyVal_GetData( &t_kval, &p_guest->t_info, GUEST_VNC_ENABLE_KEY );
421- if( 0x00 != i_err ) { goto goto_TuiGuest_GeneratePageText_skipVNC; }
422- if( ! KEYVAL_DATA_ISBOOL( t_kval ) ) { goto goto_TuiGuest_GeneratePageText_skipVNC; }
423-
424- t_attr.i_attr = A_BOLD;
425- TextBuf_AppendLine( &lt_guest.t_textbuf, " Graphics (VNC):", 0, (void *)&t_attr );
426-
427- TuiGuest_OutputLine( &(p_guest->t_info), "Enable", GUEST_VNC_ENABLE_KEY, 1, NULL, 0x00, 0x00 );
428- TuiGuest_OutputLine( &(p_guest->t_info), "Host", GUEST_VNC_HOST_KEY, 1, NULL, 0x00, 0x00 );
429- TuiGuest_OutputLine( &(p_guest->t_info), "Port", GUEST_VNC_PORT_KEY, 1, NULL, 0x00, 0x00 );
430- TuiGuest_OutputLine( &(p_guest->t_info), "Reslution", GUEST_VNC_RESOLUTION_KEY, 1, NULL, 0x00, 0x00 );
431- TuiGuest_OutputLine( &(p_guest->t_info), "Wait", GUEST_VNC_WAIT_KEY, 1, NULL, 0x00, 0x00 );
432- TuiGuest_OutputLine( &(p_guest->t_info), "VGA", GUEST_VNC_VGA_KEY, 1, NULL, 0x00, 0x00 );
461+ if( 0x00 != i_err )
462+ { goto goto_TuiGuest_GeneratePageText_skipVNC; }
463+ if( ! KEYVAL_DATA_ISBOOL( t_kval ) )
464+ { goto goto_TuiGuest_GeneratePageText_skipVNC; }
465+
466+ TuiGuest_AppendLine( " Graphics (VNC):", NULL, A_BOLD,
467+ TUIGUEST_LINEATTR_NORMAL, NULL, NULL );
468+
469+ TuiGuest_OutputLine( &(p_guest->t_info), "Enable", GUEST_VNC_ENABLE_KEY, 1,
470+ NULL, 0x00, 0x00, NULL, NULL );
471+ TuiGuest_OutputLine( &(p_guest->t_info), "Host", GUEST_VNC_HOST_KEY, 1,
472+ NULL, 0x00, 0x00, NULL, NULL );
473+ TuiGuest_OutputLine( &(p_guest->t_info), "Port", GUEST_VNC_PORT_KEY, 1,
474+ NULL, 0x00, 0x00, NULL, NULL );
475+ TuiGuest_OutputLine( &(p_guest->t_info), "Reslution", GUEST_VNC_RESOLUTION_KEY, 1,
476+ NULL, 0x00, 0x00, NULL, NULL );
477+ TuiGuest_OutputLine( &(p_guest->t_info), "Wait", GUEST_VNC_WAIT_KEY, 1,
478+ NULL, 0x00, 0x00, NULL, NULL );
479+ TuiGuest_OutputLine( &(p_guest->t_info), "VGA", GUEST_VNC_VGA_KEY, 1,
480+ NULL, 0x00, 0x00, NULL, NULL );
433481
434482 goto_TuiGuest_GeneratePageText_skipVNC:
435483
436484 // SSH --
437485 i_err = KeyVal_GetData( &t_kval, &p_guest->t_info, GUEST_SSH_ENABLE_KEY );
438- if( 0x00 != i_err ) { goto goto_TuiGuest_GeneratePageText_skipSSH; }
439- if( ! KEYVAL_DATA_ISBOOL( t_kval ) ) { goto goto_TuiGuest_GeneratePageText_skipSSH; }
440-
441- t_attr.i_attr = A_BOLD;
442- TextBuf_AppendLine( &lt_guest.t_textbuf, " Secure Shell (SSH):", 0, (void *)&t_attr );
443-
444- TuiGuest_OutputLine( &(p_guest->t_info), "Enable", GUEST_SSH_ENABLE_KEY, 1, NULL, 0x00, 0x00 );
445- TuiGuest_OutputLine( &(p_guest->t_info), "IP Address", GUEST_SSH_IPADDR_KEY, 1, NULL, 0x00, 0x00 );
446- TuiGuest_OutputLine( &(p_guest->t_info), "Use Step Server", GUEST_SSH_USE_STEPSERVER_KEY, 1, NULL, 0x00, 0x00 );
447- TuiGuest_OutputLine( &(p_guest->t_info), "USER", GUEST_SSH_USER_KEY, 1, NULL, 0x00, 0x00 );
448- TuiGuest_OutputLine( &(p_guest->t_info), "Password", GUEST_SSH_PASSWORD_KEY, 1, NULL, 0x00, 0x00 );
449- TuiGuest_OutputLine( &(p_guest->t_info), "Connection Type", GUEST_SSH_CONTYPE_KEY, 1, NULL, 0x00, 0x00 );
486+ if( 0x00 != i_err )
487+ { goto goto_TuiGuest_GeneratePageText_skipSSH; }
488+ if( ! KEYVAL_DATA_ISBOOL( t_kval ) )
489+ { goto goto_TuiGuest_GeneratePageText_skipSSH; }
490+
491+ TuiGuest_AppendLine( " Secure Shell (SSH):", NULL, A_BOLD,
492+ TUIGUEST_LINEATTR_NORMAL, NULL, NULL );
493+
494+ TuiGuest_OutputLine( &(p_guest->t_info), "Enable", GUEST_SSH_ENABLE_KEY, 1,
495+ NULL, 0x00, 0x00, NULL, NULL );
496+ TuiGuest_OutputLine( &(p_guest->t_info), "IP Address", GUEST_SSH_IPADDR_KEY, 1,
497+ NULL, 0x00, TUIGUEST_LINE_DYNAMIC | TUIGUEST_LINE_IPADDR,
498+ NULL, NULL );
499+ TuiGuest_OutputLine( &(p_guest->t_info), "Use Step Server", GUEST_SSH_USE_STEPSERVER_KEY, 1,
500+ NULL, 0x00, 0x00, NULL, NULL );
501+ TuiGuest_OutputLine( &(p_guest->t_info), "USER", GUEST_SSH_USER_KEY, 1,
502+ NULL, 0x00, TUIGUEST_LINE_DYNAMIC | TUIGUEST_LINE_STRING,
503+ NULL, NULL );
504+ TuiGuest_OutputLine( &(p_guest->t_info), "Password", GUEST_SSH_PASSWORD_KEY, 1,
505+ NULL, 0x00, TUIGUEST_LINE_DYNAMIC | TUIGUEST_LINE_PASSWORD,
506+ NULL, NULL );
507+ TuiGuest_OutputLine( &(p_guest->t_info), "Connection Type", GUEST_SSH_CONTYPE_KEY, 1,
508+ NULL, 0x00, 0x00,
509+ NULL, NULL );
450510
451511 goto_TuiGuest_GeneratePageText_skipSSH:
452512
453513 // Grub --
454- t_attr.i_attr = A_BOLD;
455- TextBuf_AppendLine( &lt_guest.t_textbuf, " GRUB:", 0, (void *)&t_attr );
514+ TuiGuest_AppendLine( " GRUB:", NULL, A_BOLD, TUIGUEST_LINEATTR_NORMAL, NULL, NULL );
456515
457- TuiGuest_OutputLine( &(p_guest->t_info), "Run Partition", GUEST_GRUB_RUNPARTITION_KEY, 1, NULL, 0x00, 0x00 );
458- TuiGuest_OutputLine( &(p_guest->t_info), "Run Directory", GUEST_GRUB_RUNDIR_KEY, 1, NULL, 0x00, 0x00 );
459- TuiGuest_OutputLine( &(p_guest->t_info), "Run File", GUEST_GRUB_RUNFILE_KEY, 1, NULL, 0x00, 0x00 );
516+ TuiGuest_OutputLine( &(p_guest->t_info), "Run Partition", GUEST_GRUB_RUNPARTITION_KEY, 1,
517+ NULL, 0x00, 0x00, NULL, NULL );
518+ TuiGuest_OutputLine( &(p_guest->t_info), "Run Directory", GUEST_GRUB_RUNDIR_KEY, 1,
519+ NULL, 0x00, 0x00, NULL, NULL );
520+ TuiGuest_OutputLine( &(p_guest->t_info), "Run File", GUEST_GRUB_RUNFILE_KEY, 1,
521+ NULL, 0x00, 0x00, NULL, NULL );
460522
461523 i_err = KeyVal_GetData( &t_kval, &p_guest->t_info, GUEST_GRUB_INSTALL_ITEMS_KEY );
462- if( 0x00 != i_err ) { goto goto_TuiGuest_GeneratePageText_skipGRUB_Install; }
463- if( 0 == KEYVAL_DATA_INT( t_kval ) ) { goto goto_TuiGuest_GeneratePageText_skipGRUB_Install; }
524+ if( 0x00 != i_err )
525+ { goto goto_TuiGuest_GeneratePageText_skipGRUB_Install; }
526+ if( 0 == KEYVAL_DATA_INT( t_kval ) )
527+ { goto goto_TuiGuest_GeneratePageText_skipGRUB_Install; }
464528
465- TextBuf_AppendLine( &lt_guest.t_textbuf, " GRUB Install Command:", 0, NULL );
529+ TuiGuest_AppendLine( " GRUB Install Command:", NULL, 0x00,
530+ TUIGUEST_LINEATTR_NORMAL, NULL, NULL );
466531
467532 i_max = KEYVAL_DATA_INT( t_kval );
468533 for( i_cnt = 0; i_cnt < i_max; i_cnt++ ) {
469- t_attr.i_attr = 0x00;
470534 snprintf( str_temp, sizeof( str_temp ), " #%d:", i_cnt );
471- TextBuf_AppendLine( &lt_guest.t_textbuf, str_temp, 0, NULL );
535+ TuiGuest_AppendLine( str_temp, NULL, 0x00, TUIGUEST_LINEATTR_NORMAL, NULL, NULL );
472536
473537 snprintf( str_key, sizeof( str_key ), GUEST_GRUB_BASEKEY"/%d/%s",
474538 i_cnt, GUEST_GRUB_INSTALL_SUBKEY );
475- TuiGuest_OutputLine( &(p_guest->t_info), str_temp, str_key, 2, NULL, 0x00, 0x00 );
539+ TuiGuest_OutputLine( &(p_guest->t_info), str_temp, str_key, 2,
540+ NULL, 0x00, 0x00, NULL, NULL );
476541 }
477542
478543 goto_TuiGuest_GeneratePageText_skipGRUB_Install:
479544
480545 i_err = KeyVal_GetData( &t_kval, &p_guest->t_info, GUEST_GRUB_RUN_ITEMS_KEY );
481- if( 0x00 != i_err ) { goto goto_TuiGuest_GeneratePageText_skipGRUB_Run; }
482- if( 0 == KEYVAL_DATA_INT( t_kval ) ) { goto goto_TuiGuest_GeneratePageText_skipGRUB_Run; }
546+ if( 0x00 != i_err )
547+ { goto goto_TuiGuest_GeneratePageText_skipGRUB_Run; }
548+ if( 0 == KEYVAL_DATA_INT( t_kval ) )
549+ { goto goto_TuiGuest_GeneratePageText_skipGRUB_Run; }
483550
484- TextBuf_AppendLine( &lt_guest.t_textbuf, " GRUB Run Command:", 0, NULL );
551+ TuiGuest_AppendLine( " GRUB Run Command:", NULL, 0x00,
552+ TUIGUEST_LINEATTR_NORMAL, NULL, NULL );
485553
486554 i_max = KEYVAL_DATA_INT( t_kval );
487555 for( i_cnt = 0; i_cnt < i_max; i_cnt++ ) {
488- t_attr.i_attr = 0x00;
489556 snprintf( str_temp, sizeof( str_temp ), " #%d:", i_cnt );
490- TextBuf_AppendLine( &lt_guest.t_textbuf, str_temp, 0, NULL );
557+ TuiGuest_AppendLine( str_temp, NULL, 0x00, TUIGUEST_LINEATTR_NORMAL, NULL, NULL );
491558
492559 snprintf( str_key, sizeof( str_key ), GUEST_GRUB_BASEKEY"/%d/%s",
493560 i_cnt, GUEST_GRUB_RUN_SUBKEY );
494- TuiGuest_OutputLine( &(p_guest->t_info), str_temp, str_key, 2, NULL, 0x00, 0x00 );
561+ TuiGuest_OutputLine( &(p_guest->t_info), str_temp, str_key, 2,
562+ NULL, 0x00, 0x00, NULL, NULL );
495563 }
496564
497565 goto_TuiGuest_GeneratePageText_skipGRUB_Run:
498566
499567 // Other Settings --
500- t_attr.i_attr = A_BOLD;
501- TextBuf_AppendLine( &lt_guest.t_textbuf, " Other Settings:", 0, (void *)&t_attr );
502-
503- TuiGuest_OutputLine( &(p_guest->t_info), "HostBridge", GUEST_HOSTBRIDGE_KEY, 1, NULL, 0x00, 0x00 );
504- TuiGuest_OutputLine( &(p_guest->t_info), "Com Ports", GUEST_COMPORTS_KEY, 1, NULL, 0x00, 0x00 );
505- TuiGuest_OutputLine( &(p_guest->t_info), "Use UTC time", GUEST_UTCTIME_KEY, 1, NULL, 0x00, 0x00 );
506- TuiGuest_OutputLine( &(p_guest->t_info), "Enable DebugLog", GUEST_DEBUG_KEY, 1, NULL, 0x00, 0x00 );
507- TuiGuest_OutputLine( &(p_guest->t_info), "UUID", GUEST_UUID_KEY, 1, NULL, 0x00, 0x00 );
508- TuiGuest_OutputLine( &(p_guest->t_info), "Ignore Bad MSR", GUEST_IGNORE_BADMSR_KEY, 1, NULL, 0x00, 0x00 );
509- TuiGuest_OutputLine( &(p_guest->t_info), "VirtIO Random", GUEST_VIRT_RANDOM_KEY, 1, NULL, 0x00, 0x00 );
510- TuiGuest_OutputLine( &(p_guest->t_info), "Enable XHCI mouse", GUEST_XHCI_MOUSE_KEY, 1, NULL, 0x00, 0x00 );
511- TuiGuest_OutputLine( &(p_guest->t_info), "AHCI Device Limits", GUEST_AHCI_DEVLIMIT_KEY, 1, NULL, 0x00, 0x00 );
512- TuiGuest_OutputLine( &(p_guest->t_info), "Start Slot", GUEST_START_SLOT_KEY, 1, NULL, 0x00, 0x00 );
513- TuiGuest_OutputLine( &(p_guest->t_info), "Install Slot", GUEST_INSTALL_SLOT_KEY, 1, NULL, 0x00, 0x00 );
568+ TuiGuest_AppendLine( " Other Settings:", NULL, A_BOLD,
569+ TUIGUEST_LINEATTR_NORMAL, NULL, NULL );
570+
571+ TuiGuest_OutputLine( &(p_guest->t_info), "HostBridge", GUEST_HOSTBRIDGE_KEY, 1,
572+ NULL, 0x00, 0x00, NULL, NULL );
573+ TuiGuest_OutputLine( &(p_guest->t_info), "Com Ports", GUEST_COMPORTS_KEY, 1,
574+ NULL, 0x00, 0x00, NULL, NULL );
575+ TuiGuest_OutputLine( &(p_guest->t_info), "Use UTC time", GUEST_UTCTIME_KEY, 1,
576+ NULL, 0x00, 0x00, NULL, NULL );
577+ TuiGuest_OutputLine( &(p_guest->t_info), "Enable DebugLog", GUEST_DEBUG_KEY, 1,
578+ NULL, 0x00, 0x00, NULL, NULL );
579+ TuiGuest_OutputLine( &(p_guest->t_info), "UUID", GUEST_UUID_KEY, 1,
580+ NULL, 0x00, 0x00, NULL, NULL );
581+ TuiGuest_OutputLine( &(p_guest->t_info), "Ignore Bad MSR", GUEST_IGNORE_BADMSR_KEY, 1,
582+ NULL, 0x00, 0x00, NULL, NULL );
583+ TuiGuest_OutputLine( &(p_guest->t_info), "VirtIO Random", GUEST_VIRT_RANDOM_KEY, 1,
584+ NULL, 0x00, 0x00, NULL, NULL );
585+ TuiGuest_OutputLine( &(p_guest->t_info), "Enable XHCI mouse", GUEST_XHCI_MOUSE_KEY, 1,
586+ NULL, 0x00, 0x00, NULL, NULL );
587+ TuiGuest_OutputLine( &(p_guest->t_info), "AHCI Device Limits", GUEST_AHCI_DEVLIMIT_KEY, 1,
588+ NULL, 0x00, 0x00, NULL, NULL );
589+ TuiGuest_OutputLine( &(p_guest->t_info), "Start Slot", GUEST_START_SLOT_KEY, 1,
590+ NULL, 0x00, 0x00, NULL, NULL );
591+ TuiGuest_OutputLine( &(p_guest->t_info), "Install Slot", GUEST_INSTALL_SLOT_KEY, 1,
592+ NULL, 0x00, 0x00, NULL, NULL );
514593
515594 // Bhyve Settings --
516- t_attr.i_attr = A_BOLD;
517- TextBuf_AppendLine( &lt_guest.t_textbuf, " BHYVE Settings:", 0, (void *)&t_attr );
518-
519- TuiGuest_OutputLine( &(p_guest->t_info), "Priority", GUEST_BHYVE_PRIORITY_KEY, 1, NULL, 0x00, 0x00 );
520- TuiGuest_OutputLine( &(p_guest->t_info), "Add Option", GUEST_BHYVE_OPTIONS_KEY, 1, NULL, 0x00, 0x00 );
521- TuiGuest_OutputLine( &(p_guest->t_info), "Enable PreStart", GUEST_BHYVE_PRESTART_KEY, 1, NULL, 0x00, 0x00 );
522- TuiGuest_OutputLine( &(p_guest->t_info), "Enable AutoStart", GUEST_BHYVE_AUTOSTART_KEY, 1, NULL, 0x00, 0x00 );
595+ TuiGuest_AppendLine( " BHYVE Settings:", NULL, A_BOLD,
596+ TUIGUEST_LINEATTR_NORMAL, NULL, NULL );
597+
598+ TuiGuest_OutputLine( &(p_guest->t_info), "Priority", GUEST_BHYVE_PRIORITY_KEY, 1,
599+ NULL, 0x00, 0x00, NULL, NULL );
600+ TuiGuest_OutputLine( &(p_guest->t_info), "Add Option", GUEST_BHYVE_OPTIONS_KEY, 1,
601+ NULL, 0x00, 0x00, NULL, NULL );
602+ TuiGuest_OutputLine( &(p_guest->t_info), "Enable PreStart", GUEST_BHYVE_PRESTART_KEY, 1,
603+ NULL, 0x00, 0x00, NULL, NULL );
604+ TuiGuest_OutputLine( &(p_guest->t_info), "Enable AutoStart", GUEST_BHYVE_AUTOSTART_KEY, 1,
605+ NULL, 0x00, 0x00, NULL, NULL );
523606
524607 // Passthru --
525608 i_err = KeyVal_GetData( &t_kval, &p_guest->t_info, GUEST_PASSTHRU_ITEMS_KEY );
526609 if( 0x00 != i_err ) { goto goto_TuiGuest_GeneratePageText_skipPassThru; }
527610 if( 0 == KEYVAL_DATA_INT( t_kval ) ) { goto goto_TuiGuest_GeneratePageText_skipPassThru; }
528611
529- t_attr.i_attr = A_BOLD;
530- TextBuf_AppendLine( &lt_guest.t_textbuf, " PassThru:", 0, (void *)&t_attr );
612+ TuiGuest_AppendLine( " PassThru:", NULL, A_BOLD, TUIGUEST_LINEATTR_NORMAL, NULL, NULL );
531613
532614 i_max = KEYVAL_DATA_INT( t_kval );
533615 for( i_cnt = 0; i_cnt < i_max; i_cnt++ ) {
534- t_attr.i_attr = 0x00;
535616 snprintf( str_temp, sizeof( str_temp ), "PassThru #%d:", i_cnt );
536617 snprintf( str_key, sizeof( str_key ), GUEST_PASSTHRU_BASEKEY"/%d/%s",
537618 i_cnt, GUEST_PASSTHRU_SUBKEY );
538- TuiGuest_OutputLine( &(p_guest->t_info), str_temp, str_key, 2, NULL, 0x00, 0x00 );
619+ TuiGuest_OutputLine( &(p_guest->t_info), str_temp, str_key, 2,
620+ NULL, 0x00, 0x00, NULL, NULL );
539621 }
540622
541623 goto_TuiGuest_GeneratePageText_skipPassThru:
542624
543625 // DataStore --
544- t_attr.i_attr = A_BOLD;
545- TextBuf_AppendLine( &lt_guest.t_textbuf, " DataStore:", 0, (void *)&t_attr );
626+ TuiGuest_AppendLine( " DataStore:", NULL, A_BOLD, TUIGUEST_LINEATTR_NORMAL, NULL, NULL );
546627
547- TuiGuest_OutputLine( &(p_guest->t_info), "Name", GUEST_DATASTORE_NAME_KEY, 1, NULL, 0x00, 0x00 );
548- TuiGuest_OutputLine( &(p_guest->t_info), "Path", GUEST_DATASTORE_PATH_KEY, 1, NULL, 0x00, 0x00 );
628+ TuiGuest_OutputLine( &(p_guest->t_info), "Name", GUEST_DATASTORE_NAME_KEY, 1,
629+ NULL, 0x00, 0x00, NULL, NULL );
630+ TuiGuest_OutputLine( &(p_guest->t_info), "Path", GUEST_DATASTORE_PATH_KEY, 1,
631+ NULL, 0x00, 0x00, NULL, NULL );
549632
550633 // ZFS -
551- t_attr.i_attr = 0x00;
552- TextBuf_AppendLine( &lt_guest.t_textbuf, " ZFS Option:", 0, (void *)&t_attr );
634+ TuiGuest_AppendLine( " ZFS Option:", NULL, 0x00, TUIGUEST_LINEATTR_NORMAL, NULL, NULL );
553635
554- TuiGuest_OutputLine( &(p_guest->t_info), "Dataset Option", GUEST_ZFS_DATASETOPTS_KEY, 2, NULL, 0x00, 0x00 );
555- TuiGuest_OutputLine( &(p_guest->t_info), "ZVolume Option", GUEST_ZFS_ZVOLOPTS_KEY, 2, NULL, 0x00, 0x00 );
636+ TuiGuest_OutputLine( &(p_guest->t_info), "Dataset Option", GUEST_ZFS_DATASETOPTS_KEY, 2,
637+ NULL, 0x00, 0x00, NULL, NULL );
638+ TuiGuest_OutputLine( &(p_guest->t_info), "ZVolume Option", GUEST_ZFS_ZVOLOPTS_KEY, 2,
639+ NULL, 0x00, 0x00, NULL, NULL );
556640
557641 // Resource Limitter --
558- t_attr.i_attr = A_BOLD;
559- TextBuf_AppendLine( &lt_guest.t_textbuf, " Resource Limitter Settings:", 0, (void *)&t_attr );
560-
561- TuiGuest_OutputLine( &(p_guest->t_info), "CPU usage", GUEST_LIMIT_CPU_PER_KEY, 1, "%", 0x00, 0x00 );
562- TuiGuest_OutputLine( &(p_guest->t_info), "Disk Read bps", GUEST_LIMIT_DISK_READ_BPS_KEY, 1, "bps", 0x00, 0x00 );
563- TuiGuest_OutputLine( &(p_guest->t_info), "Disk Read IOPS", GUEST_LIMIT_DISK_READ_IOPS_KEY, 1, "IOPS", 0x00, 0x00 );
564- TuiGuest_OutputLine( &(p_guest->t_info), "Disk Write bps", GUEST_LIMIT_DISK_WRITE_BPS_KEY, 1, "bps", 0x00, 0x00 );
565- TuiGuest_OutputLine( &(p_guest->t_info), "Disk Write IOPS", GUEST_LIMIT_DISK_WRITE_IOPS_KEY, 1, "IOPS", 0x00, 0x00 );
642+ TuiGuest_AppendLine( " Resource Limitter Settings:", NULL, A_BOLD,
643+ TUIGUEST_LINEATTR_NORMAL, NULL, NULL );
644+
645+ TuiGuest_OutputLine( &(p_guest->t_info), "CPU usage", GUEST_LIMIT_CPU_PER_KEY, 1,
646+ "%", 0x00, 0x00, NULL, NULL );
647+ TuiGuest_OutputLine( &(p_guest->t_info), "Disk Read bps", GUEST_LIMIT_DISK_READ_BPS_KEY, 1,
648+ "bps", 0x00, 0x00, NULL, NULL );
649+ TuiGuest_OutputLine( &(p_guest->t_info), "Disk Read IOPS", GUEST_LIMIT_DISK_READ_IOPS_KEY, 1,
650+ "IOPS", 0x00, 0x00, NULL, NULL );
651+ TuiGuest_OutputLine( &(p_guest->t_info), "Disk Write bps", GUEST_LIMIT_DISK_WRITE_BPS_KEY, 1,
652+ "bps", 0x00, 0x00, NULL, NULL );
653+ TuiGuest_OutputLine( &(p_guest->t_info), "Disk Write IOPS", GUEST_LIMIT_DISK_WRITE_IOPS_KEY, 1,
654+ "IOPS", 0x00, 0x00, NULL, NULL );
566655
567656 Guest_Release( p_guest );
568657
--- a/src/tuiguest.h
+++ b/src/tuiguest.h
@@ -45,9 +45,22 @@ VMTUI_TUIGUEST_EXTERN int TuiGuest_Term( void );
4545 typedef struct {
4646 int i_attr;
4747 DWord dw_option;
48- #define TUIGUEST_LINEATTR_NORMAL 0x00
49- #define TUIGUEST_LINEATTR_ONLYVALUE 0x01
50- char str_key[32];
48+ #define TUIGUEST_LINEATTR_NORMAL 0x00000000
49+ #define TUIGUEST_LINEATTR_ONLYVALUE 0x00000001
50+ #define TUIGUEST_LINE_EDITABLE 0x00000010
51+ #define TUIGUEST_LINE_DYNAMIC (0x00000000|TUIGUEST_LINE_EDITABLE)
52+ #define TUIGUEST_LINE_STATIC (0x00000020|TUIGUEST_LINE_EDITABLE)
53+ #define TUIGUEST_LINE_STRING 0x00000000
54+ #define TUIGUEST_LINE_INTEGER 0x00000100
55+ #define TUIGUEST_LINE_DECIMAL (0x00000200|TUIGUEST_LINE_INTEGER)
56+ #define TUIGUEST_LINE_IPADDR (0x00000200|TUIGUEST_LINE_INTEGER)
57+ #define TUIGUEST_LINE_SFXINT 0x00000400
58+ #define TUIGUEST_LINE_PASSWORD 0x00000800
59+ #define TUIGUEST_LINE_YESNO 0x00001000
60+ #define TUIGUEST_LINE_SELECT 0x00002000
61+ char str_key[KEYVAL_MAXLEN_KEY];
62+ ConfFile_SelectValue *pt_select;
63+ ConfFile_CheckValue pf_check;
5164 } TuiGuest_LineAttr;
5265
5366 static struct {
--- a/src/tuikey.c
+++ b/src/tuikey.c
@@ -139,9 +139,7 @@ char *
139139 TuiKey_GetInputStringAndPasswd(
140140 int *pi_len, int *pi_cursor )
141141 {
142- if(( TUIKEY_MODE_INPUTSTR != gi_keymode ) && ( TUIKEY_MODE_INPUTPASSWD != gi_keymode )) {
143- return NULL;
144- }
142+ if( ! (TUIKEY_MODE_INPUTSTR & gi_keymode )) { return NULL; }
145143
146144 if( NULL != pi_len )
147145 { *pi_len = gt_input.i_inputlen; }
@@ -215,7 +213,7 @@ int
215213 if( NULL != pstr_msg )
216214 { strncpy( gt_input.str_msg, pstr_msg, sizeof( gt_input.str_msg ) ); }
217215 else {
218- if( TUIKEY_MODE_INPUTINT == i_mode )
216+ if( TUIKEY_MODE_INPUTINTEGER == i_mode )
219217 { strncpy( gt_input.str_msg, "Input Integer", sizeof( gt_input.str_msg ) ); }
220218 else if( TUIKEY_MODE_INPUTDECIMAL == i_mode )
221219 { strncpy( gt_input.str_msg, "Input Floating Value", sizeof( gt_input.str_msg ) ); }
@@ -406,7 +404,7 @@ int
406404 { goto goto_TuiKey_Dispatch_Mode_InputStr_OK; }
407405 else if( TUIKEY_MODE_INPUTPASSWD == gi_keymode )
408406 { goto goto_TuiKey_Dispatch_Mode_InputStr_OK; }
409- else if( TUIKEY_MODE_INPUTINT == gi_keymode ) {
407+ else if( TUIKEY_MODE_INPUTINTEGER == gi_keymode ) {
410408 if( isdigit( i_key ) ) { goto goto_TuiKey_Dispatch_Mode_InputStr_OK; }
411409 }
412410 else if(( TUIKEY_MODE_INPUTDECIMAL == gi_keymode )
@@ -512,6 +510,10 @@ int
512510 i_exit = TuiConsole_Dispatch( i_key );
513511 break;
514512 case TUIKEY_MODE_INPUTSTR:
513+ case TUIKEY_MODE_INPUTINTEGER:
514+ case TUIKEY_MODE_INPUTDECIMAL:
515+ //case TUIKEY_MODE_INPUTIPADDR:
516+ case TUIKEY_MODE_INPUTSFXINT:
515517 case TUIKEY_MODE_INPUTPASSWD:
516518 i_exit = TuiKey_Dispatch_Mode_InputStr( i_key );
517519 break;
--- a/src/tuikey.h
+++ b/src/tuikey.h
@@ -62,7 +62,7 @@ VMTUI_TUIKEY_EXTERN int TuiKey_Term( void );
6262 #define TUIKEY_MODE_CONSOLE (0x03+TUIKEY_MODE_INFO)
6363 #define TUIKEY_MODE_ERRINFO (0x04+TUIKEY_MODE_INFO)
6464 #define TUIKEY_MODE_INPUTSTR 0x20
65-#define TUIKEY_MODE_INPUTINT 0x21 // bit 1 : digit
65+#define TUIKEY_MODE_INPUTINTEGER 0x21 // bit 1 : digit
6666 #define TUIKEY_MODE_INPUTDECIMAL 0x23 // bit 2 : digit + '.'
6767 #define TUIKEY_MODE_INPUTIPADDR 0x23
6868 #define TUIKEY_MODE_INPUTSFXINT 0x24 // bit 3 : suffix