diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2014-12-12 18:06:22 +0100 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2014-12-13 00:47:23 +0100 |
commit | d3d3208f607693b8fde5226efa0cc15ec17670a0 (patch) | |
tree | cb6e77ad93c053a9aca6202dd0a1fa9c4a791a3d /src/journal/journal-file.c | |
parent | 1b8951e5bd9b2bf1722098a861055cae0bb52088 (diff) |
journal: move type_to_context() to journal-file.c
It has no other callers. It does not need to be in the header file.
Diffstat (limited to 'src/journal/journal-file.c')
-rw-r--r-- | src/journal/journal-file.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index f70699010e..4632326d4f 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -374,6 +374,11 @@ static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) return 0; } +static unsigned type_to_context(int type) { + /* One context for each type, plus one catch-all for the rest */ + return type > 0 && type < _OBJECT_TYPE_MAX ? type : 0; +} + static int journal_file_move_to(JournalFile *f, int context, bool keep_always, uint64_t offset, uint64_t size, void **ret) { assert(f); assert(ret); |