chiark / gitweb /
nspawn: skip symlink to a combined cgroup hierarchy if it already exists
[elogind.git] / src / shared / util.h
index 5b2a08389e5a5422ab6412ae87ee407ed0bfa45b..b4e0b778ae335c8b0a66ad983cd0adbf85a86589 100644 (file)
@@ -405,6 +405,7 @@ bool machine_name_is_valid(const char *s) _pure_;
 
 char* strshorten(char *s, size_t l);
 
+int symlink_idempotent(const char *from, const char *to);
 
 int symlink_atomic(const char *from, const char *to);
 int mknod_atomic(const char *path, mode_t mode, dev_t dev);
@@ -881,20 +882,6 @@ int chattr_path(const char *p, unsigned value, unsigned mask);
 int read_attr_fd(int fd, unsigned *ret);
 int read_attr_path(const char *p, unsigned *ret);
 
-typedef struct LockFile {
-        char *path;
-        int fd;
-        int operation;
-} LockFile;
-
-int make_lock_file(const char *p, int operation, LockFile *ret);
-int make_lock_file_for(const char *p, int operation, LockFile *ret);
-void release_lock_file(LockFile *f);
-
-#define _cleanup_release_lock_file_ _cleanup_(release_lock_file)
-
-#define LOCK_FILE_INIT { .fd = -1, .path = NULL }
-
 #define RLIMIT_MAKE_CONST(lim) ((struct rlimit) { lim, lim })
 
 ssize_t sparse_write(int fd, const void *p, size_t sz, size_t run_length);