diff options
author | Maksym Telychko <maksym.telychko@globallogic.com> | 2020-03-30 11:45:18 +0300 |
---|---|---|
committer | Maksym Telychko <maksym.telychko@globallogic.com> | 2020-03-30 11:45:18 +0300 |
commit | f4b78a288c9e5c2a7a05d71b9bbe9e5fc26f2a63 (patch) | |
tree | 8f34d8cc0515bee08b278e943e4f649c81a774bb /src/utils.h | |
parent | 3d3c735f3bbd269f97bd59a246d5f18b010eda2b (diff) | |
download | sms-utils-f4b78a288c9e5c2a7a05d71b9bbe9e5fc26f2a63.tar.gz sms-utils-f4b78a288c9e5c2a7a05d71b9bbe9e5fc26f2a63.tar.bz2 sms-utils-f4b78a288c9e5c2a7a05d71b9bbe9e5fc26f2a63.zip |
MTX-3262 mpower lockfile rewrite for libmts-io compatibility
Diffstat (limited to 'src/utils.h')
-rw-r--r-- | src/utils.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/utils.h b/src/utils.h index 04a71b6..eb9d5bc 100644 --- a/src/utils.h +++ b/src/utils.h @@ -30,12 +30,18 @@ enum { USER_YESNO_YES = 1, }; +struct Lock { + char *path; + int fd; +}; + int user_yesno(int def, const char *fmt, ...); int systemf(const char *fmt, ...); FILE *popenf(const char *mode, const char *fmt, ...); char *shell_path_expand(const char *path); -char *device_lock(const char *path); +struct Lock *device_lock(const char *path); +struct Lock *device_unlock(struct Lock *lock); int indexOfChar(const char *array, int len, char character); |