[Darshan-commits] [Darshan] branch, dev-modular, updated. darshan-2.3.1-50-gb2b9fcb
Service Account
git at mcs.anl.gov
Tue Mar 17 17:27:51 CDT 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".
The branch, dev-modular has been updated
via b2b9fcbef8fd7a0475eef712d0e96aac50d2c4c3 (commit)
from 694c6a9ae8bf695a9a84e1e2c9f35535d1b6c9a7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b2b9fcbef8fd7a0475eef712d0e96aac50d2c4c3
Author: Shane Snyder <ssnyder at mcs.anl.gov>
Date: Tue Mar 17 17:27:39 2015 -0500
forgot new util files
-----------------------------------------------------------------------
Summary of changes:
darshan-util/darshan-posix-logutils.c | 57 +++++++++++++++++++++++++++++++++
darshan-util/darshan-posix-logutils.h | 14 ++++++++
2 files changed, 71 insertions(+), 0 deletions(-)
create mode 100644 darshan-util/darshan-posix-logutils.c
create mode 100644 darshan-util/darshan-posix-logutils.h
Diff of changes:
diff --git a/darshan-util/darshan-posix-logutils.c b/darshan-util/darshan-posix-logutils.c
new file mode 100644
index 0000000..8e0107f
--- /dev/null
+++ b/darshan-util/darshan-posix-logutils.c
@@ -0,0 +1,57 @@
+/*
+ * (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
+ */
diff --git a/darshan-util/darshan-posix-logutils.h b/darshan-util/darshan-posix-logutils.h
new file mode 100644
index 0000000..c8ffc19
--- /dev/null
+++ b/darshan-util/darshan-posix-logutils.h
@@ -0,0 +1,14 @@
+/*
+ * (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
hooks/post-receive
--
More information about the Darshan-commits
mailing list