Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sudheer Chunduri
darshan
Commits
b2b9fcbe
Commit
b2b9fcbe
authored
Mar 17, 2015
by
Shane Snyder
Browse files
forgot new util files
parent
694c6a9a
Changes
2
Hide whitespace changes
Inline
Side-by-side
darshan-util/darshan-posix-logutils.c
0 → 100644
View file @
b2b9fcbe
/*
* (C) 2009 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
#define _GNU_SOURCE
#include "darshan-util-config.h"
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#include <unistd.h>
#include <inttypes.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include "darshan-posix-logutils.h"
int
darshan_log_get_posix_file
(
darshan_fd
fd
,
struct
darshan_posix_file
*
file
)
{
int
i
;
int
ret
;
/* reset file record, so that diff compares against a zero'd out record
* if file is missing
*/
memset
(
file
,
0
,
sizeof
(
*
file
));
ret
=
darshan_log_get_moddat
(
fd
,
DARSHAN_POSIX_MOD
,
(
void
*
)
file
,
sizeof
(
*
file
));
if
(
ret
==
1
)
{
if
(
fd
->
swap_flag
)
{
/* swap bytes if necessary */
DARSHAN_BSWAP64
(
&
file
->
f_id
);
DARSHAN_BSWAP64
(
&
file
->
rank
);
for
(
i
=
0
;
i
<
CP_NUM_INDICES
;
i
++
)
DARSHAN_BSWAP64
(
&
file
->
counters
[
i
]);
for
(
i
=
0
;
i
<
CP_F_NUM_INDICES
;
i
++
)
DARSHAN_BSWAP64
(
&
file
->
fcounters
[
i
]);
}
}
return
(
ret
);
}
/*
* Local variables:
* c-indent-level: 4
* c-basic-offset: 4
* End:
*
* vim: ts=8 sts=4 sw=4 expandtab
*/
darshan-util/darshan-posix-logutils.h
0 → 100644
View file @
b2b9fcbe
/*
* (C) 2009 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
#ifndef __DARSHAN_POSIX_LOG_UTILS_H
#define __DARSHAN_POSIX_LOG_UTILS_H
#include "darshan-logutils.h"
#include "darshan-posix-log-format.h"
int
darshan_log_get_posix_file
(
darshan_fd
fd
,
struct
darshan_posix_file
*
file
);
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment