summaryrefslogtreecommitdiff
path: root/ioshark
diff options
context:
space:
mode:
authorThiƩbaud Weksteen <tweek@google.com>2020-10-26 19:21:21 +0100
committerThiƩbaud Weksteen <tweek@google.com>2020-10-28 10:40:06 +0100
commit1c72a4180a6b09382eea973b71c61807f44fe017 (patch)
tree784fa23255b3a35e6c69b9c495c0b7d14c5eb1dc /ioshark
parent959c3494f314778eb6ec234ef65fc6822533586b (diff)
downloadextras-1c72a4180a6b09382eea973b71c61807f44fe017.tar.gz
ioshark: fix headers
The headers are not self-contained. Adds the required import and #define guard. Fix a typo and an extraneous semi-colon. Test: mm Change-Id: I06cbf290121be35afea5a1db5f9710b4023567db
Diffstat (limited to 'ioshark')
-rw-r--r--ioshark/compile_ioshark.h6
-rw-r--r--ioshark/compile_ioshark_subr.c2
-rw-r--r--ioshark/ioshark.h2
-rw-r--r--ioshark/ioshark_bench_mmap.c2
4 files changed, 10 insertions, 2 deletions
diff --git a/ioshark/compile_ioshark.h b/ioshark/compile_ioshark.h
index 5dd8b7b7..5a39aeb7 100644
--- a/ioshark/compile_ioshark.h
+++ b/ioshark/compile_ioshark.h
@@ -14,6 +14,12 @@
* limitations under the License.
*/
+#include <stdio.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include "ioshark.h"
+
#define FILE_DB_HASHSIZE 8192
struct files_db_s {
diff --git a/ioshark/compile_ioshark_subr.c b/ioshark/compile_ioshark_subr.c
index 9f2028a1..43fb2544 100644
--- a/ioshark/compile_ioshark_subr.c
+++ b/ioshark/compile_ioshark_subr.c
@@ -32,7 +32,7 @@ static struct files_db_s *files_db_buckets[FILE_DB_HASHSIZE];
static int current_fileno = 1;
static int num_objects = 0;
-static int filename_cache_lookup(char *filename);;
+static int filename_cache_lookup(char *filename);
void
files_db_write_objects(FILE *fp)
diff --git a/ioshark/ioshark.h b/ioshark/ioshark.h
index 2e87b563..ab692be3 100644
--- a/ioshark/ioshark.h
+++ b/ioshark/ioshark.h
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#pragma once
+
/*
* Format of the parsed workload files.
* 1) Header
diff --git a/ioshark/ioshark_bench_mmap.c b/ioshark/ioshark_bench_mmap.c
index 55d70606..e8b3acce 100644
--- a/ioshark/ioshark_bench_mmap.c
+++ b/ioshark/ioshark_bench_mmap.c
@@ -180,7 +180,7 @@ ioshark_handle_mmap(void *db_node,
exit(EXIT_FAILURE);
}
/*
- * The size of the file better accomodate offset + len
+ * The size of the file better accommodate offset + len
* Else there is an issue with pre-creation
*/
assert(offset + len <= statbuf.st_size);