summaryrefslogtreecommitdiff
path: root/lockfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'lockfile.c')
-rw-r--r--lockfile.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lockfile.c b/lockfile.c
index df9c704..5e954ba 100644
--- a/lockfile.c
+++ b/lockfile.c
@@ -364,6 +364,13 @@ FILE *fdopen_lock_file(struct lock_file *lk, const char *mode)
return lk->fp;
}
+const char *get_lock_file_path(struct lock_file *lk)
+{
+ if (!lk->active)
+ die("BUG: get_lock_file_path() called for unlocked object");
+ return lk->filename.buf;
+}
+
int get_lock_file_fd(struct lock_file *lk)
{
if (!lk->active)