Mercurial > illumos > illumos-gate
changeset 12918:00c95d1e0c4d
6971696 Do not look at type field to determine log severity level
author | Todd McKenney <todd.mckenney@oracle.com> |
---|---|
date | Sun, 25 Jul 2010 17:40:14 -0600 |
parents | 75c3920f2546 |
children | eeab51820f81 |
files | usr/src/lib/fm/libseslog/common/libseslog.c usr/src/lib/fm/libseslog/common/libseslog.h |
diffstat | 2 files changed, 0 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/lib/fm/libseslog/common/libseslog.c Sun Jul 25 16:25:27 2010 -0700 +++ b/usr/src/lib/fm/libseslog/common/libseslog.c Sun Jul 25 17:40:14 2010 -0600 @@ -229,12 +229,10 @@ unsigned char *log_param_ptr; /* Log parameter pointer */ unsigned char *log_str_ptr; /* ptr to ascii str returend by expander */ - char log_event_type[ENTRY_MAX_SIZE]; char log_code[ENTRY_MAX_SIZE]; char log_level[ENTRY_MAX_SIZE]; nvlist_t *entry; char entry_num[15]; - int type; int match_found = 0; char save_buffer[MAX_LOG_ENTRY_SZ]; char entry_added = 0; @@ -332,7 +330,6 @@ return (SES_LOG_FAILED_NVLIST_CREATE); } - (void) memset(log_event_type, 0, sizeof (log_event_type)); (void) memset(log_code, 0, sizeof (log_code)); (void) memset(save_buffer, 0, sizeof (save_buffer)); (void) memset(log_level, 0, sizeof (log_level)); @@ -378,9 +375,6 @@ (const char *)log_str_ptr, SES_LOG_VALID_LOG_SIZE); - (void) strncpy(log_event_type, (const char *)log_str_ptr + - SES_LOG_EVENT_TYPE_START, SES_LOG_SPECIFIC_ENTRY_SIZE); - (void) strncpy(log_code, (const char *)log_str_ptr+SES_LOG_CODE_START, SES_LOG_SPECIFIC_ENTRY_SIZE); @@ -389,23 +383,6 @@ (const char *) log_str_ptr + SES_LOG_LEVEL_START, 1); - /* event type is in log_event_type */ - /* 4x004 = looking for x */ - type = (strtoul(log_event_type, 0, 16) >> 12) & 0xf; - - /* - * Check type. If type is 1, level needs to be - * changed to FATAL(4). If type is something other - * than 0 or 1, they are info only(0). - */ - if (type == 1) { - (void) strcpy(log_level, "4"); - } else if (type > 1) { - /* These are not application log */ - /* entries */ - /* make them info only */ - (void) strcpy(log_level, "0"); - } /* Add this entry to the nvlist log data */ if (nvlist_alloc(&entry, NV_UNIQUE_NAME, 0) != 0) {
--- a/usr/src/lib/fm/libseslog/common/libseslog.h Sun Jul 25 16:25:27 2010 -0700 +++ b/usr/src/lib/fm/libseslog/common/libseslog.h Sun Jul 25 17:40:14 2010 -0600 @@ -74,8 +74,6 @@ /* The string log is made from 8 char entries */ #define SES_LOG_SPECIFIC_ENTRY_SIZE 8 -/* Index of where log event type starts */ -#define SES_LOG_EVENT_TYPE_START 4 /* Index of where sequence number starts in returned string */ #define SES_LOG_SEQ_NUM_START 27 /* Index of where log code starts */