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 632a813..8883da2 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 7ffbaf7..ef4b9b2 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)