aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYunchih Chen <yunchih.cat@gmail.com>2017-12-01 11:01:58 +0800
committerYunchih Chen <yunchih.cat@gmail.com>2017-12-01 11:01:58 +0800
commit15f0360911c3ff0a25f36820c41f54d265ccbd81 (patch)
tree67b90cc1aa6bfd301efaba03e97ce46f9f238882
parentec0e71f4c1eefce0ae650c9340522c377a6abff3 (diff)
downloadnfcollect-15f0360911c3ff0a25f36820c41f54d265ccbd81.tar
nfcollect-15f0360911c3ff0a25f36820c41f54d265ccbd81.tar.gz
nfcollect-15f0360911c3ff0a25f36820c41f54d265ccbd81.tar.bz2
nfcollect-15f0360911c3ff0a25f36820c41f54d265ccbd81.tar.lz
nfcollect-15f0360911c3ff0a25f36820c41f54d265ccbd81.tar.xz
nfcollect-15f0360911c3ff0a25f36820c41f54d265ccbd81.tar.zst
nfcollect-15f0360911c3ff0a25f36820c41f54d265ccbd81.zip
Remove unused comment
-rw-r--r--commit.c1
-rw-r--r--main.c20
2 files changed, 0 insertions, 21 deletions
diff --git a/commit.c b/commit.c
index 90cecfd..020c9c3 100644
--- a/commit.c
+++ b/commit.c
@@ -5,7 +5,6 @@
extern char *storage_dir;
extern char *storage_prefix;
const uint32_t write_blk_size = 8196;
-const uint32_t commit_file_open_flag = O_RDWR | O_CREAT | O_APPEND | O_DIRECT;
void nfl_commit_init() {
diff --git a/main.c b/main.c
index 0606e0f..b759e62 100644
--- a/main.c
+++ b/main.c
@@ -56,26 +56,6 @@ void sig_handler(int signo) {
/* TODO */
}
}
-/*
-void *open_trunk_storage(uint32_t size){
- int fd;
-
- // open file and map to memory
- ERR((fd = open(mapfile, O_RDWR | O_CREAT | O_TRUNC, (mode_t)0600)) == -1,
- "Could not open file");
-
- ERR(lseek(fd, size - 1, SEEK_SET) == -1,
- "Could not seek to end of file");
-
- // ERR(fallocate(fd, 0, 0, storage_size_byte) == -1,
- // "Could not seek to end of file");
-
- ERR(write(fd, "", 1) == -1, "Could not write to end of file");
-
- return mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
-}
-*/
-
nflog_state_t *get_nflog_state(uint32_t id, uint32_t entries_max) {
nflog_state_t *state =
(nflog_state_t *)malloc(sizeof(nflog_state_t));