summaryrefslogtreecommitdiff
path: root/src/shared/util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-10-31 01:25:44 +0100
committerLennart Poettering <lennart@poettering.net>2013-10-31 01:43:38 +0100
commit04d39279245834494baccfdb9349db8bf80abd13 (patch)
tree2e6b213bfd273af6e157e77bf0d03ff68bf144cc /src/shared/util.h
parentf85fc8454137a5cfba99b3a24aaa6dc38f6e2768 (diff)
machinectl: add new command to spawn a getty inside a container
Diffstat (limited to 'src/shared/util.h')
-rw-r--r--src/shared/util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/shared/util.h b/src/shared/util.h
index dc35b4d980..d90b808476 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -572,6 +572,10 @@ static inline void umaskp(mode_t *u) {
umask(*u);
}
+static inline void close_pipep(int (*p)[2]) {
+ close_pipe(*p);
+}
+
DEFINE_TRIVIAL_CLEANUP_FUNC(FILE*, fclose);
DEFINE_TRIVIAL_CLEANUP_FUNC(FILE*, pclose);
DEFINE_TRIVIAL_CLEANUP_FUNC(DIR*, closedir);
@@ -585,6 +589,7 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(FILE*, endmntent);
#define _cleanup_pclose_ _cleanup_(pclosep)
#define _cleanup_closedir_ _cleanup_(closedirp)
#define _cleanup_endmntent_ _cleanup_(endmntentp)
+#define _cleanup_close_pipe_ _cleanup_(close_pipep)
_malloc_ _alloc_(1, 2) static inline void *malloc_multiply(size_t a, size_t b) {
if (_unlikely_(b == 0 || a > ((size_t) -1) / b))