]>
Commit | Line | Data |
---|---|---|
53e1b683 | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
cd2eb9e9 CW |
2 | #pragma once |
3 | ||
4 | /*** | |
5 | This file is part of systemd. | |
6 | ||
7 | Copyright 2011 Lennart Poettering | |
cd2eb9e9 CW |
8 | ***/ |
9 | ||
11c3a366 TA |
10 | #include <stddef.h> |
11 | ||
cd2eb9e9 CW |
12 | #include "macro.h" |
13 | #include "missing.h" | |
14 | ||
15 | typedef struct LockFile { | |
16 | char *path; | |
17 | int fd; | |
18 | int operation; | |
19 | } LockFile; | |
20 | ||
21 | int make_lock_file(const char *p, int operation, LockFile *ret); | |
22 | int make_lock_file_for(const char *p, int operation, LockFile *ret); | |
23 | void release_lock_file(LockFile *f); | |
24 | ||
cd2eb9e9 | 25 | #define LOCK_FILE_INIT { .fd = -1, .path = NULL } |