115
115
static const char *
116
116
event2str (audit_event_t event)
118
int idx = eventstr_msgidxof (event);
118
/* We need the cast so that compiler does not complain about an
119
always true comparison (>= 0) for an unsigned value. */
120
int idx = eventstr_msgidxof ((int)event);
120
122
return "Unknown event";
450
452
if (ctx->use_html && format && oktext)
454
if (!strcmp (oktext, "Yes")
455
|| !strcmp (oktext, "good") )
457
else if (!strcmp (oktext, "No")
458
|| !strcmp (oktext, "bad") )
462
if (format && oktext)
464
const char *s = NULL;
452
466
if (!strcmp (oktext, "Yes"))
454
468
else if (!strcmp (oktext, "No"))
470
else if (!strcmp (oktext, "good"))
472
/* TRANSLATORS: Copy the prefix between the vertical bars
473
verbatim. It will not be printed. */
474
oktext = _("|audit-log-result|Good");
476
else if (!strcmp (oktext, "bad"))
477
oktext = _("|audit-log-result|Bad");
478
else if (!strcmp (oktext, "unsupported"))
479
oktext = _("|audit-log-result|Not supported");
480
else if (!strcmp (oktext, "no-cert"))
481
oktext = _("|audit-log-result|No certificate");
482
else if (!strcmp (oktext, "error"))
483
oktext = _("|audit-log-result|Error");
487
/* If we have set a prefix, skip it. */
488
if (!s && *oktext == '|' && (s=strchr (oktext+1,'|')))
458
492
if (ctx->use_html)