summaryrefslogtreecommitdiff
path: root/src/shared/missing.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-12-27 17:44:04 +0100
committerLennart Poettering <lennart@poettering.net>2014-12-28 02:08:40 +0100
commitebd93cb684806ac0f352139e69ac8f53eb49f5e4 (patch)
tree537df721db4f8a9a05ff8a3093481f5ea5571a92 /src/shared/missing.h
parent086821244b5113f00a0ef993b78dc56aae2a8f6c (diff)
machinectl/machined: implement "rename", "clone", "read-only" verbs for machine images
Diffstat (limited to 'src/shared/missing.h')
-rw-r--r--src/shared/missing.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/shared/missing.h b/src/shared/missing.h
index dd7bef4d9d..08cf83647d 100644
--- a/src/shared/missing.h
+++ b/src/shared/missing.h
@@ -657,3 +657,13 @@ static inline int raw_clone(unsigned long flags, void *child_stack) {
static inline pid_t raw_getpid(void) {
return (pid_t) syscall(__NR_getpid);
}
+
+#if !HAVE_DECL_RENAMEAT2
+static inline int renameat2(int oldfd, const char *oldname, int newfd, const char *newname, unsigned flags) {
+ return syscall(__NR_renameat2, oldfd, oldname, newfd, newname, flags);
+}
+#endif
+
+#ifndef RENAME_NOREPLACE
+#define RENAME_NOREPLACE (1 << 0)
+#endif