Commit e5bfa490 authored by Shane Snyder's avatar Shane Snyder

slight api change for retrieving mod records

parent a94832b3
...@@ -30,8 +30,8 @@ char *hdf5_f_counter_names[] = { ...@@ -30,8 +30,8 @@ char *hdf5_f_counter_names[] = {
}; };
#undef X #undef X
static int darshan_log_get_hdf5_file(darshan_fd fd, void** hdf5_buf_p, static int darshan_log_get_hdf5_file(void** hdf5_buf_p, int* bytes_left,
int* bytes_left, void** file_rec, darshan_record_id* rec_id); void** file_rec, darshan_record_id* rec_id, int byte_swap_flag);
static void darshan_log_print_hdf5_file(void *file_rec, static void darshan_log_print_hdf5_file(void *file_rec,
char *file_name, char *mnt_pt, char *fs_type); char *file_name, char *mnt_pt, char *fs_type);
...@@ -41,8 +41,8 @@ struct darshan_mod_logutil_funcs hdf5_logutils = ...@@ -41,8 +41,8 @@ struct darshan_mod_logutil_funcs hdf5_logutils =
.log_print_record = &darshan_log_print_hdf5_file, .log_print_record = &darshan_log_print_hdf5_file,
}; };
static int darshan_log_get_hdf5_file(darshan_fd fd, void** hdf5_buf_p, static int darshan_log_get_hdf5_file(void** hdf5_buf_p, int* bytes_left,
int* bytes_left, void** file_rec, darshan_record_id* rec_id) void** file_rec, darshan_record_id* rec_id, int byte_swap_flag)
{ {
int i; int i;
struct darshan_hdf5_file *file = (struct darshan_hdf5_file *) struct darshan_hdf5_file *file = (struct darshan_hdf5_file *)
...@@ -51,7 +51,7 @@ static int darshan_log_get_hdf5_file(darshan_fd fd, void** hdf5_buf_p, ...@@ -51,7 +51,7 @@ static int darshan_log_get_hdf5_file(darshan_fd fd, void** hdf5_buf_p,
if(*bytes_left < sizeof(struct darshan_hdf5_file)) if(*bytes_left < sizeof(struct darshan_hdf5_file))
return(-1); return(-1);
if(fd->swap_flag) if(byte_swap_flag)
{ {
/* swap bytes if necessary */ /* swap bytes if necessary */
DARSHAN_BSWAP64(&file->f_id); DARSHAN_BSWAP64(&file->f_id);
......
...@@ -46,11 +46,11 @@ struct darshan_record_ref ...@@ -46,11 +46,11 @@ struct darshan_record_ref
struct darshan_mod_logutil_funcs struct darshan_mod_logutil_funcs
{ {
int (*log_get_record)( int (*log_get_record)(
darshan_fd fd,
void** mod_buf_p, void** mod_buf_p,
int* mod_bytes_left, int* mod_bytes_left,
void** file_rec, void** file_rec,
darshan_record_id* rec_id darshan_record_id* rec_id,
int byte_swap_flag
); );
void (*log_print_record)( void (*log_print_record)(
void *file_rec, void *file_rec,
......
...@@ -30,8 +30,8 @@ char *mpiio_f_counter_names[] = { ...@@ -30,8 +30,8 @@ char *mpiio_f_counter_names[] = {
}; };
#undef X #undef X
static int darshan_log_get_mpiio_file(darshan_fd fd, void** mpiio_buf_p, static int darshan_log_get_mpiio_file(void** mpiio_buf_p, int* bytes_left,
int* bytes_left, void** file_rec, darshan_record_id* rec_id); void** file_rec, darshan_record_id* rec_id, int byte_swap_flag);
static void darshan_log_print_mpiio_file(void *file_rec, static void darshan_log_print_mpiio_file(void *file_rec,
char *file_name, char *mnt_pt, char *fs_type); char *file_name, char *mnt_pt, char *fs_type);
...@@ -41,8 +41,8 @@ struct darshan_mod_logutil_funcs mpiio_logutils = ...@@ -41,8 +41,8 @@ struct darshan_mod_logutil_funcs mpiio_logutils =
.log_print_record = &darshan_log_print_mpiio_file, .log_print_record = &darshan_log_print_mpiio_file,
}; };
static int darshan_log_get_mpiio_file(darshan_fd fd, void** mpiio_buf_p, static int darshan_log_get_mpiio_file(void** mpiio_buf_p, int* bytes_left,
int* bytes_left, void** file_rec, darshan_record_id* rec_id) void** file_rec, darshan_record_id* rec_id, int byte_swap_flag)
{ {
int i; int i;
struct darshan_mpiio_file *file = (struct darshan_mpiio_file *) struct darshan_mpiio_file *file = (struct darshan_mpiio_file *)
...@@ -51,7 +51,7 @@ static int darshan_log_get_mpiio_file(darshan_fd fd, void** mpiio_buf_p, ...@@ -51,7 +51,7 @@ static int darshan_log_get_mpiio_file(darshan_fd fd, void** mpiio_buf_p,
if(*bytes_left < sizeof(struct darshan_mpiio_file)) if(*bytes_left < sizeof(struct darshan_mpiio_file))
return(-1); return(-1);
if(fd->swap_flag) if(byte_swap_flag)
{ {
/* swap bytes if necessary */ /* swap bytes if necessary */
DARSHAN_BSWAP64(&file->f_id); DARSHAN_BSWAP64(&file->f_id);
......
...@@ -30,8 +30,8 @@ char *pnetcdf_f_counter_names[] = { ...@@ -30,8 +30,8 @@ char *pnetcdf_f_counter_names[] = {
}; };
#undef X #undef X
static int darshan_log_get_pnetcdf_file(darshan_fd fd, void** pnetcdf_buf_p, static int darshan_log_get_pnetcdf_file(void** pnetcdf_buf_p, int* bytes_left,
int* bytes_left, void** file_rec, darshan_record_id* rec_id); void** file_rec, darshan_record_id* rec_id, int byte_swap_flag);
static void darshan_log_print_pnetcdf_file(void *file_rec, static void darshan_log_print_pnetcdf_file(void *file_rec,
char *file_name, char *mnt_pt, char *fs_type); char *file_name, char *mnt_pt, char *fs_type);
...@@ -41,8 +41,8 @@ struct darshan_mod_logutil_funcs pnetcdf_logutils = ...@@ -41,8 +41,8 @@ struct darshan_mod_logutil_funcs pnetcdf_logutils =
.log_print_record = &darshan_log_print_pnetcdf_file, .log_print_record = &darshan_log_print_pnetcdf_file,
}; };
static int darshan_log_get_pnetcdf_file(darshan_fd fd, void** pnetcdf_buf_p, static int darshan_log_get_pnetcdf_file(void** pnetcdf_buf_p, int* bytes_left,
int* bytes_left, void** file_rec, darshan_record_id* rec_id) void** file_rec, darshan_record_id* rec_id, int byte_swap_flag)
{ {
int i; int i;
struct darshan_pnetcdf_file *file = (struct darshan_pnetcdf_file *) struct darshan_pnetcdf_file *file = (struct darshan_pnetcdf_file *)
...@@ -51,7 +51,7 @@ static int darshan_log_get_pnetcdf_file(darshan_fd fd, void** pnetcdf_buf_p, ...@@ -51,7 +51,7 @@ static int darshan_log_get_pnetcdf_file(darshan_fd fd, void** pnetcdf_buf_p,
if(*bytes_left < sizeof(struct darshan_pnetcdf_file)) if(*bytes_left < sizeof(struct darshan_pnetcdf_file))
return(-1); return(-1);
if(fd->swap_flag) if(byte_swap_flag)
{ {
/* swap bytes if necessary */ /* swap bytes if necessary */
DARSHAN_BSWAP64(&file->f_id); DARSHAN_BSWAP64(&file->f_id);
......
...@@ -30,8 +30,8 @@ char *posix_f_counter_names[] = { ...@@ -30,8 +30,8 @@ char *posix_f_counter_names[] = {
}; };
#undef X #undef X
static int darshan_log_get_posix_file(darshan_fd fd, void** psx_buf_p, static int darshan_log_get_posix_file(void** psx_buf_p, int* bytes_left,
int* bytes_left, void** file_rec, darshan_record_id* rec_id); void** file_rec, darshan_record_id* rec_id, int byte_swap_flag);
static void darshan_log_print_posix_file(void *file_rec, static void darshan_log_print_posix_file(void *file_rec,
char *file_name, char *mnt_pt, char *fs_type); char *file_name, char *mnt_pt, char *fs_type);
...@@ -41,8 +41,8 @@ struct darshan_mod_logutil_funcs posix_logutils = ...@@ -41,8 +41,8 @@ struct darshan_mod_logutil_funcs posix_logutils =
.log_print_record = &darshan_log_print_posix_file, .log_print_record = &darshan_log_print_posix_file,
}; };
static int darshan_log_get_posix_file(darshan_fd fd, void** psx_buf_p, static int darshan_log_get_posix_file(void** psx_buf_p, int* bytes_left,
int* bytes_left, void **file_rec, darshan_record_id* rec_id) void** file_rec, darshan_record_id* rec_id, int byte_swap_flag)
{ {
int i; int i;
struct darshan_posix_file *file = (struct darshan_posix_file *) struct darshan_posix_file *file = (struct darshan_posix_file *)
...@@ -51,7 +51,7 @@ static int darshan_log_get_posix_file(darshan_fd fd, void** psx_buf_p, ...@@ -51,7 +51,7 @@ static int darshan_log_get_posix_file(darshan_fd fd, void** psx_buf_p,
if(*bytes_left < sizeof(struct darshan_posix_file)) if(*bytes_left < sizeof(struct darshan_posix_file))
return(-1); return(-1);
if(fd->swap_flag) if(byte_swap_flag)
{ {
/* swap bytes if necessary */ /* swap bytes if necessary */
DARSHAN_BSWAP64(&file->f_id); DARSHAN_BSWAP64(&file->f_id);
......
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