chiark / gitweb /
core: set $JOURNAL_STREAM to the dev_t/ino_t of the journal stream of executed services
authorLennart Poettering <lennart@poettering.net>
Tue, 14 Jun 2016 14:50:45 +0000 (16:50 +0200)
committerSven Eden <yamakuzure@gmx.net>
Fri, 16 Jun 2017 08:12:59 +0000 (10:12 +0200)
This permits services to detect whether their stdout/stderr is connected to the
journal, and if so talk to the journal directly, thus permitting carrying of
metadata.

As requested by the gtk folks: #2473

src/basic/formats-util.h

index 9b4e8e9..39a185f 100644 (file)
 #else
 #  error Unknown rlim_t size
 #endif
 #else
 #  error Unknown rlim_t size
 #endif
+
+#if SIZEOF_DEV_T == 8
+#  define DEV_FMT "%" PRIu64
+#elif SIZEOF_DEV_T == 4
+#  define DEV_FMT "%" PRIu32
+#else
+#  error Unknown dev_t size
+#endif
+
+#if SIZEOF_INO_T == 8
+#  define INO_FMT "%" PRIu64
+#elif SIZEOF_INO_T == 4
+#  define INO_FMT "%" PRIu32
+#else
+#  error Unknown ino_t size
+#endif