From: Zbigniew Jędrzejewski-Szmek Date: Sun, 4 Nov 2012 15:19:04 +0000 (+0100) Subject: sd-journal: do not require path to be absolute X-Git-Tag: v199~163 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=8cb17a6dc88cecfcee3189765031e9e8a1f4106b;hp=763c7aa288485cf5ab627fe1d25ff58e76f9dacb sd-journal: do not require path to be absolute Seems natural to be able to specify relative directory, e.g. with journalctl -D. And even if, this should be checked in front-end code, not in the library. --- diff --git a/man/journalctl.xml b/man/journalctl.xml index 632a8134d..8883da278 100644 --- a/man/journalctl.xml +++ b/man/journalctl.xml @@ -437,7 +437,7 @@ - Takes an absolute + Takes a directory path as argument. If specified journalctl will operate on the specified journal directory instead of diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 7ffbaf7cb..ef4b9b224 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -1596,7 +1596,7 @@ _public_ int sd_journal_open_directory(sd_journal **ret, const char *path, int f if (!ret) return -EINVAL; - if (!path || !path_is_absolute(path)) + if (!path) return -EINVAL; if (flags != 0)