diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-10-16 23:00:04 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-10-16 23:00:04 +0200 |
commit | 5e6870eab5aa00675e4cd2f914fd1c25642fc964 (patch) | |
tree | 58f1d5d89d041a53f61b7b3e9dd961d856405738 /src | |
parent | 44a5fa34d9f9a5050cdf4a497e6ccf5af2d1678d (diff) |
journalctl: properly track rotated journals in follow mode
Diffstat (limited to 'src')
-rw-r--r-- | src/journal/sd-journal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 99ac1fd4ef..16ed4239ce 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -1333,7 +1333,7 @@ static int add_directory(sd_journal *j, const char *prefix, const char *dirname) m->wd = inotify_add_watch(j->inotify_fd, m->path, IN_CREATE|IN_MOVED_TO|IN_MODIFY|IN_ATTRIB|IN_DELETE| - IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT| + IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_MOVED_FROM| IN_ONLYDIR); if (m->wd > 0 && hashmap_put(j->directories_by_wd, INT_TO_PTR(m->wd), m) < 0) @@ -1951,7 +1951,7 @@ static void process_inotify_event(sd_journal *j, struct inotify_event *e) { if (r < 0) log_debug("Failed to add file %s/%s: %s", d->path, e->name, strerror(-r)); - } else if (e->mask & (IN_DELETE|IN_UNMOUNT)) { + } else if (e->mask & (IN_DELETE|IN_MOVED_FROM|IN_UNMOUNT)) { r = remove_file(j, d->path, e->name); if (r < 0) |