chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move DEFINE_TRIVIAL_CLEANUP_FUNC to macro.h
[elogind.git]
/
src
/
journal
/
sd-journal.c
diff --git
a/src/journal/sd-journal.c
b/src/journal/sd-journal.c
index d46dc3c29c6a7cee21eb44e5af5a7918e18e812c..0268675abbd5fcf0bb471ba93a6fb41969cb7e34 100644
(file)
--- a/
src/journal/sd-journal.c
+++ b/
src/journal/sd-journal.c
@@
-43,8
+43,6
@@
#include "replace-var.h"
#include "fileio.h"
#include "replace-var.h"
#include "fileio.h"
-#define JOURNAL_FILES_MAX 1024
-
#define JOURNAL_FILES_RECHECK_USEC (2 * USEC_PER_SEC)
#define REPLACE_VAR_MAX 256
#define JOURNAL_FILES_RECHECK_USEC (2 * USEC_PER_SEC)
#define REPLACE_VAR_MAX 256
@@
-1198,11
+1196,6
@@
static int add_any_file(sd_journal *j, const char *path) {
if (ordered_hashmap_get(j->files, path))
return 0;
if (ordered_hashmap_get(j->files, path))
return 0;
- if (ordered_hashmap_size(j->files) >= JOURNAL_FILES_MAX) {
- log_warning("Too many open journal files, not adding %s.", path);
- return set_put_error(j, -ETOOMANYREFS);
- }
-
r = journal_file_open(path, O_RDONLY, 0, false, false, NULL, j->mmap, NULL, &f);
if (r < 0)
return r;
r = journal_file_open(path, O_RDONLY, 0, false, false, NULL, j->mmap, NULL, &f);
if (r < 0)
return r;
@@
-2188,11
+2181,11
@@
_public_ int sd_journal_process(sd_journal *j) {
j->last_process_usec = now(CLOCK_MONOTONIC);
for (;;) {
j->last_process_usec = now(CLOCK_MONOTONIC);
for (;;) {
- u
int8_t buffer[INOTIFY_EVENT_MAX] _alignas_(struct inotify_event)
;
+ u
nion inotify_event_buffer buffer
;
struct inotify_event *e;
ssize_t l;
struct inotify_event *e;
ssize_t l;
- l = read(j->inotify_fd, buffer, sizeof(buffer));
+ l = read(j->inotify_fd,
&
buffer, sizeof(buffer));
if (l < 0) {
if (errno == EAGAIN || errno == EINTR)
return got_something ? determine_change(j) : SD_JOURNAL_NOP;
if (l < 0) {
if (errno == EAGAIN || errno == EINTR)
return got_something ? determine_change(j) : SD_JOURNAL_NOP;