From 15f0360911c3ff0a25f36820c41f54d265ccbd81 Mon Sep 17 00:00:00 2001 From: Yunchih Chen Date: Fri, 1 Dec 2017 11:01:58 +0800 Subject: Remove unused comment --- commit.c | 1 - main.c | 20 -------------------- 2 files changed, 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)); -- cgit v1.2.3