Skip to content

Commit

Permalink
Merge pull request #253 from FrankYu/master
Browse files Browse the repository at this point in the history
use the appropriate headers instead of define the macros
  • Loading branch information
mitake committed Jun 16, 2016
2 parents a629775 + d719510 commit 366ccda
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
8 changes: 1 addition & 7 deletions lib/common.c
Expand Up @@ -18,18 +18,12 @@
#include <fcntl.h>
#include <dirent.h>
#include <inttypes.h>
#include <linux/falloc.h>

#include "util.h"
#include "work.h"
#include "common.h"

#ifndef FALLOC_FL_KEEP_SIZE
#define FALLOC_FL_KEEP_SIZE 0x01
#endif
#ifndef FALLOC_FL_PUNCH_HOLE
#define FALLOC_FL_PUNCH_HOLE 0x02
#endif

static struct work_queue *util_wqueue;

void register_util_wq(struct work_queue *wq)
Expand Down
4 changes: 0 additions & 4 deletions sheep/store/common.c
Expand Up @@ -20,10 +20,6 @@ char *epoch_path;
struct store_driver *sd_store;
LIST_HEAD(store_drivers);

#ifndef FALLOC_FL_PUNCH_HOLE
#define FALLOC_FL_PUNCH_HOLE 0x02
#endif

#define sector_algined(x) ({ ((x) & (SECTOR_SIZE - 1)) == 0; })

static inline bool iocb_is_aligned(const struct siocb *iocb)
Expand Down
1 change: 1 addition & 0 deletions tests/unit/lib/test_punchhole.c
Expand Up @@ -4,6 +4,7 @@
#include <fcntl.h> /* O_* flags */
#include <unity.h>
#include <cmock.h>
#include <linux/falloc.h>

#include "util.h"
#include "Mocklogger.h"
Expand Down

0 comments on commit 366ccda

Please sign in to comment.