diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-06-14 16:50:45 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-06-15 23:00:27 +0200 |
commit | 7bce046bcf076e9cb359f1c78951b879430edb9e (patch) | |
tree | 9baa942b069efbee5e9030530792559bfb169846 /src/basic | |
parent | fd1f9c89f72ebbe5d071cccf7754299fc87b9b26 (diff) |
core: set $JOURNAL_STREAM to the dev_t/ino_t of the journal stream of executed services
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
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/formats-util.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/basic/formats-util.h b/src/basic/formats-util.h index 9b4e8e98fa..39a185f59b 100644 --- a/src/basic/formats-util.h +++ b/src/basic/formats-util.h @@ -61,3 +61,19 @@ #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 |