chiark / gitweb /
sd-journal: do not require path to be absolute
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 4 Nov 2012 15:19:04 +0000 (16:19 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 18 Mar 2013 23:49:33 +0000 (19:49 -0400)
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.

man/journalctl.xml
src/journal/sd-journal.c

index 632a8134dbd57350a26e8eecc89f79ea2f0730d4..8883da278c82293050f009345a29364b950ff713 100644 (file)
                                 <term><option>-D</option></term>
                                 <term><option>--directory=</option></term>
 
                                 <term><option>-D</option></term>
                                 <term><option>--directory=</option></term>
 
-                                <listitem><para>Takes an absolute
+                                <listitem><para>Takes a
                                 directory path as argument. If
                                 specified journalctl will operate on the
                                 specified journal directory instead of
                                 directory path as argument. If
                                 specified journalctl will operate on the
                                 specified journal directory instead of
index 7ffbaf7cbf50b0998df795d34c4c8ef8afc52a23..ef4b9b2242a422c64867eb776feadc987eee566d 100644 (file)
@@ -1596,7 +1596,7 @@ _public_ int sd_journal_open_directory(sd_journal **ret, const char *path, int f
         if (!ret)
                 return -EINVAL;
 
         if (!ret)
                 return -EINVAL;
 
-        if (!path || !path_is_absolute(path))
+        if (!path)
                 return -EINVAL;
 
         if (flags != 0)
                 return -EINVAL;
 
         if (flags != 0)