summaryrefslogtreecommitdiffstats
path: root/g13
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2011-09-23 14:43:58 +0200
committerWerner Koch <wk@gnupg.org>2011-09-23 14:43:58 +0200
commitb73ae3ca36547939c9aaf54c0d05fbc93d47c096 (patch)
tree3e7dfac40a0da7a3a03336713a642ca093d5f6f7 /g13
parentRemove support for RISCOS from dotlock.c (diff)
downloadgnupg2-b73ae3ca36547939c9aaf54c0d05fbc93d47c096.tar.xz
gnupg2-b73ae3ca36547939c9aaf54c0d05fbc93d47c096.zip
Renamed the lock functions.
Also cleaned up the dotlock code for easier readability.
Diffstat (limited to 'g13')
-rw-r--r--g13/create.c6
-rw-r--r--g13/g13.c2
-rw-r--r--g13/mount.c6
3 files changed, 7 insertions, 7 deletions
diff --git a/g13/create.c b/g13/create.c
index 2b998e2b2..60c1d3d31 100644
--- a/g13/create.c
+++ b/g13/create.c
@@ -246,10 +246,10 @@ g13_create_container (ctrl_t ctrl, const char *filename, strlist_t keys)
/* Take a lock and proceed with the creation. If there is a lock we
immediately return an error because for creation it does not make
sense to wait. */
- lock = create_dotlock (filename);
+ lock = dotlock_create (filename);
if (!lock)
return gpg_error_from_syserror ();
- if (make_dotlock (lock, 0))
+ if (dotlock_take (lock, 0))
{
err = gpg_error_from_syserror ();
goto leave;
@@ -319,7 +319,7 @@ g13_create_container (ctrl_t ctrl, const char *filename, strlist_t keys)
xfree (detachedname);
xfree (enckeyblob);
xfree (keyblob);
- destroy_dotlock (lock);
+ dotlock_destroy (lock);
return err;
}
diff --git a/g13/g13.c b/g13/g13.c
index 180b0d96a..972a7eaaf 100644
--- a/g13/g13.c
+++ b/g13/g13.c
@@ -383,7 +383,7 @@ main ( int argc, char **argv)
gnupg_init_signals (0, emergency_cleanup);
- create_dotlock (NULL); /* Register locking cleanup. */
+ dotlock_create (NULL); /* Register locking cleanup. */
opt.session_env = session_env_new ();
if (!opt.session_env)
diff --git a/g13/mount.c b/g13/mount.c
index 387bb6f32..198fde076 100644
--- a/g13/mount.c
+++ b/g13/mount.c
@@ -273,14 +273,14 @@ g13_mount_container (ctrl_t ctrl, const char *filename, const char *mountpoint)
}
/* Try to take a lock. */
- lock = create_dotlock (filename);
+ lock = dotlock_create (filename);
if (!lock)
{
xfree (mountpoint_buffer);
return gpg_error_from_syserror ();
}
- if (make_dotlock (lock, 0))
+ if (dotlock_take (lock, 0))
{
err = gpg_error_from_syserror ();
goto leave;
@@ -359,7 +359,7 @@ g13_mount_container (ctrl_t ctrl, const char *filename, const char *mountpoint)
destroy_tupledesc (tuples);
xfree (keyblob);
xfree (enckeyblob);
- destroy_dotlock (lock);
+ dotlock_destroy (lock);
xfree (mountpoint_buffer);
return err;
}