Commit 246c491e authored by Shane Snyder's avatar Shane Snyder
Browse files

parser shouldn't abort with no-name records

parent fba89f42
...@@ -422,24 +422,35 @@ int main(int argc, char **argv) ...@@ -422,24 +422,35 @@ int main(int argc, char **argv)
{ {
char *mnt_pt = NULL; char *mnt_pt = NULL;
char *fs_type = NULL; char *fs_type = NULL;
char *rec_name = NULL;
hash_entry_t *hfile = NULL; hash_entry_t *hfile = NULL;
base_rec = (struct darshan_base_record *)mod_buf; base_rec = (struct darshan_base_record *)mod_buf;
/* get the pathname for this record */ /* get the pathname for this record */
HASH_FIND(hlink, name_hash, &(base_rec->id), sizeof(darshan_record_id), ref); HASH_FIND(hlink, name_hash, &(base_rec->id), sizeof(darshan_record_id), ref);
assert(ref);
/* get mount point and fs type associated with this record */ if(ref)
for(j=0; j<mount_count; j++)
{ {
if(strncmp(mnt_data_array[j].mnt_path, ref->name_record->name, rec_name = ref->name_record->name;
strlen(mnt_data_array[j].mnt_path)) == 0)
/* get mount point and fs type associated with this record */
for(j=0; j<mount_count; j++)
{ {
mnt_pt = mnt_data_array[j].mnt_path; if(strncmp(mnt_data_array[j].mnt_path, rec_name,
fs_type = mnt_data_array[j].mnt_type; strlen(mnt_data_array[j].mnt_path)) == 0)
break; {
mnt_pt = mnt_data_array[j].mnt_path;
fs_type = mnt_data_array[j].mnt_type;
break;
}
} }
} }
else
{
if(i == DARSHAN_BGQ_MOD)
rec_name = "darshan-bgq-record";
}
if(!mnt_pt) if(!mnt_pt)
mnt_pt = "UNKNOWN"; mnt_pt = "UNKNOWN";
if(!fs_type) if(!fs_type)
...@@ -448,7 +459,7 @@ int main(int argc, char **argv) ...@@ -448,7 +459,7 @@ int main(int argc, char **argv)
if(mask & OPTION_BASE) if(mask & OPTION_BASE)
{ {
/* print the corresponding module data for this record */ /* print the corresponding module data for this record */
mod_logutils[i]->log_print_record(mod_buf, ref->name_record->name, mod_logutils[i]->log_print_record(mod_buf, rec_name,
mnt_pt, fs_type, fd->mod_ver[i]); mnt_pt, fs_type, fd->mod_ver[i]);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment