Commit ba069024 authored by Philip Carns's avatar Philip Carns

bug fix to stat workaround


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@559 3b7491f3-a168-0410-bf4b-c445ed680a29
parent 4f01033c
......@@ -273,7 +273,8 @@ static void cp_access_counter(struct darshan_file_runtime* file, ssize_t size,
file->fd = __ret; \
if(!CP_VALUE(file, CP_FILE_ALIGNMENT)){ \
char* __tmp_path = strdup(__path); \
if(__tmp_path && stat64(__tmp_path, &cp_stat_buf) == 0) {\
char* __parent = dirname(__tmp_path); \
if(__parent && stat64(__parent, &cp_stat_buf) == 0) {\
CP_SET(file, CP_DEVICE, cp_stat_buf.st_dev); \
CP_SET(file, CP_FILE_ALIGNMENT, cp_stat_buf.st_blksize); \
CP_SET(file, CP_SIZE_AT_OPEN, cp_stat_buf.st_size); \
......
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