diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-04-25 11:31:47 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-04-25 19:29:01 +0200 |
commit | 2daa9cbdda628f3a359c0e30a5b57dfe7ad74a34 (patch) | |
tree | d2f173b71323a61eafffcfe872fdfb85c206bb3b /src | |
parent | d38c62cc76a14d9a91edd8d27aa4cdcd0edc5eec (diff) |
sd-journal: "soft" deprecate sd_journal_open_container()
Let's document the call as deprecated, since it doesn't cover containers with
directories that aren#t visible to the host properly.
Diffstat (limited to 'src')
-rw-r--r-- | src/journal/sd-journal.c | 3 | ||||
-rw-r--r-- | src/systemd/sd-journal.h | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index c1be1b5faf..27c1dd346f 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -1767,6 +1767,9 @@ _public_ int sd_journal_open_container(sd_journal **ret, const char *machine, in char *p; int r; + /* This is pretty much deprecated, people should use machined's OpenMachineRootDirectory() call instead in + * combination with sd_journal_open_directory_fd(). */ + assert_return(machine, -EINVAL); assert_return(ret, -EINVAL); assert_return((flags & ~(SD_JOURNAL_LOCAL_ONLY|SD_JOURNAL_SYSTEM)) == 0, -EINVAL); diff --git a/src/systemd/sd-journal.h b/src/systemd/sd-journal.h index ac4a2f80ae..9c36b27157 100644 --- a/src/systemd/sd-journal.h +++ b/src/systemd/sd-journal.h @@ -88,7 +88,7 @@ int sd_journal_open_directory(sd_journal **ret, const char *path, int flags); int sd_journal_open_directory_fd(sd_journal **ret, int fd, int flags); int sd_journal_open_files(sd_journal **ret, const char **paths, int flags); int sd_journal_open_files_fd(sd_journal **ret, int fds[], unsigned n_fds, int flags); -int sd_journal_open_container(sd_journal **ret, const char *machine, int flags); +int sd_journal_open_container(sd_journal **ret, const char *machine, int flags); /* deprecated */ void sd_journal_close(sd_journal *j); int sd_journal_previous(sd_journal *j); |