summaryrefslogtreecommitdiff
path: root/src/basic/formats-util.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-06-15 21:30:59 -0400
committerGitHub <noreply@github.com>2016-06-15 21:30:59 -0400
commit732cd53eebdcefa1484c43a99455904b3692f9a4 (patch)
tree6bb2a5705440dcd93e4c043408f4ebe3aabcda1d /src/basic/formats-util.h
parenta1feacf77f324f8af43de7f994372fbc72d58ae9 (diff)
parent7bce046bcf076e9cb359f1c78951b879430edb9e (diff)
Merge pull request #3537 from poettering/journal-stream-env
Permit services to detect whether their stdout/stderr is connected to the journal.
Diffstat (limited to 'src/basic/formats-util.h')
-rw-r--r--src/basic/formats-util.h16
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