• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqt誰得windowscocoapythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

Virtual machine Management Terminal User Interface


Commit MetaInfo

Révision001672f21d6d1738ccab1861b4035c24ee750f3c (tree)
l'heure2022-07-23 20:41:26
AuteurKoine Yuusuke(koinec) <koinec@user...>
CommiterKoine Yuusuke(koinec)

Message de Log

Improve ErrorMsg format for TuiErrInfo window.

Change Summary

Modification

--- a/src/errinfo.c
+++ b/src/errinfo.c
@@ -157,6 +157,8 @@ int
157157 p_err->i_request = i_request;
158158 p_err->i_errno = i_errno;
159159
160+ p_err->dw_reqseq = dw_param;
161+
160162 p_err->i_param = i_param;
161163 p_err->str_param[0] = '\0';
162164 if( NULL != pstr_param )
--- a/src/errinfo.h
+++ b/src/errinfo.h
@@ -56,6 +56,8 @@ typedef struct {
5656 int i_request;
5757 int i_errno;
5858
59+ DWord dw_reqseq;
60+
5961 int i_param;
6062 char str_param[256];
6163
--- a/src/tuierrinfo.c
+++ b/src/tuierrinfo.c
@@ -46,21 +46,40 @@ int
4646 while((256 > i_errs++) && ( 0 <= ErrInfo_GetMessage( &t_err ))) {
4747 localtime_r( &(t_err.t_errtime), &t_tm );
4848
49+ // Line 1 ----
50+ wprintw( gp_errinfo_subwin,
51+ "%04d/%02d/%02d %02d:%02d:%02d %s: %s\n",
52+ (t_tm.tm_year + 1900), t_tm.tm_mon, t_tm.tm_mday,
53+ t_tm.tm_hour, t_tm.tm_min, t_tm.tm_sec,
54+ t_err.str_level, t_err.str_errormsg );
55+
56+ // Line 2 ----
57+ if( REQUEST_ID_NONE != t_err.i_request ) {
58+ wprintw( gp_errinfo_subwin, " <H:%2d,G:%2d,Rq:%2d [%08x]>",
59+ t_err.i_hvisor, t_err.i_guest, t_err.i_request, t_err.dw_reqseq );
60+ }
61+ else {
62+ wprintw( gp_errinfo_subwin, " <H:%2d,G:%2d>",
63+ t_err.i_hvisor, t_err.i_guest );
64+ }
65+
66+ if( ERRINFO_LV_WARN >= t_err.b_level ) {
67+ wprintw( gp_errinfo_subwin, " errno(%d): %s ",
68+ t_err.i_errno, strerror( t_err.i_errno ) );
69+ }
70+ else {
71+ wprintw( gp_errinfo_subwin, " errval=%d ", t_err.i_errno );
72+ }
73+
4974 if( '\0' != t_err.str_param[0] ) {
5075 wprintw( gp_errinfo_subwin,
51- " %04d/%02d/%02d %02d:%02d:%02d %s: %s errno=%2d <H:%2d,G:%2d,Rq:%2d> (%d : %s) [%s:%3d]\n",
52- (t_tm.tm_year + 1900), t_tm.tm_mon, t_tm.tm_mday, t_tm.tm_hour, t_tm.tm_min, t_tm.tm_sec,
53- t_err.str_level, t_err.str_errormsg, t_err.i_errno,
54- t_err.i_hvisor, t_err.i_guest, t_err.i_request,
76+ " val(%d : %s) [%s:%3d]\n",
5577 t_err.i_param, t_err.str_param,
5678 t_err.str_srcfile, t_err.i_srcline);
5779 }
5880 else {
5981 wprintw( gp_errinfo_subwin,
60- " %04d/%02d/%02d %02d:%02d:%02d %s: %s errno=%2d <H:%2d,G:%2d,Rq:%2d> (%d) [%s:%3d]\n",
61- (t_tm.tm_year + 1900), t_tm.tm_mon, t_tm.tm_mday, t_tm.tm_hour, t_tm.tm_min, t_tm.tm_sec,
62- t_err.str_level, t_err.str_errormsg, t_err.i_errno,
63- t_err.i_hvisor, t_err.i_guest, t_err.i_request,
82+ " val(%d) [%s:%3d]\n",
6483 t_err.i_param,
6584 t_err.str_srcfile, t_err.i_srcline);
6685 }