diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-01-05 00:13:26 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-01-05 01:40:51 +0100 |
commit | ea69bd41c5923f4f278a09bb7d8cb1abcfa122e1 (patch) | |
tree | 28a2b7d4d92a54088a194c22f349e686a335b093 /src/journal | |
parent | 146d47736780e06f618379a6c9f46edcf46803a7 (diff) |
journald: constify all things
Diffstat (limited to 'src/journal')
-rw-r--r-- | src/journal/journald-server.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c index d987d8f759..019c3a649a 100644 --- a/src/journal/journald-server.c +++ b/src/journal/journald-server.c @@ -297,8 +297,13 @@ static JournalFile* find_journal(Server *s, uid_t uid) { return f; } -static int do_rotate(Server *s, JournalFile **f, const char* name, - bool seal, uint32_t uid) { +static int do_rotate( + Server *s, + JournalFile **f, + const char* name, + bool seal, + uint32_t uid) { + int r; assert(s); @@ -308,11 +313,9 @@ static int do_rotate(Server *s, JournalFile **f, const char* name, r = journal_file_rotate(f, s->compress, seal); if (r < 0) if (*f) - log_error_errno(r, "Failed to rotate %s: %m", - (*f)->path); + log_error_errno(r, "Failed to rotate %s: %m", (*f)->path); else - log_error_errno(r, "Failed to create new %s journal: %m", - name); + log_error_errno(r, "Failed to create new %s journal: %m", name); else server_fix_perms(s, *f, uid); return r; @@ -366,15 +369,20 @@ void server_sync(Server *s) { s->sync_scheduled = false; } -static void do_vacuum(Server *s, char *ids, JournalFile *f, const char* path, - JournalMetrics *metrics) { - char *p; +static void do_vacuum( + Server *s, + const char *id, + JournalFile *f, + const char* path, + JournalMetrics *metrics) { + + const char *p; int r; if (!f) return; - p = strappenda(path, ids); + p = strappenda(path, id); r = journal_directory_vacuum(p, metrics->max_use, s->max_retention_usec, &s->oldest_file_usec, false); if (r < 0 && r != -ENOENT) log_error_errno(r, "Failed to vacuum %s: %m", p); |