common: Make sure dotlock functions set a proper ERRNO.
authorWerner Koch <wk@gnupg.org>
Wed, 13 Jan 2016 13:42:12 +0000 (14:42 +0100)
committerWerner Koch <wk@gnupg.org>
Wed, 13 Jan 2016 13:42:12 +0000 (14:42 +0100)
commit4aceebf36f103eb380e21d12a1f08b7d6ea7cc8e
tree12f5e42bb4b1bbaef1702c79b58ae42ab82bcc25
parent160862978628b07ed5150ec2c8abad6af1656bc3
common: Make sure dotlock functions set a proper ERRNO.

* common/dotlock.c (map_w32_to_errno): New.
(read_lockfile): Return a proper ERRNO.
(dotlock_create_unix): Do not let log functions clobber ERRNO.
(dotlock_take_unix): Ditto.
(dotlock_release_unix): Ditto.
(dotlock_create_w32): Set proper ERRNO.
(dotlock_take_w32): Ditto.
(dotlock_release_w32): Ditto.

Signed-off-by: Werner Koch <wk@gnupg.org>
common/dotlock.c