Home GnuPG
Diffusion GnuPG 533bcc265e9c

common:dotlock: Clean up for error/info/warning message.

Description

common:dotlock: Clean up for error/info/warning message.

* common/dotlock.c (my_info_*,my_error_*,my_debug_1): Remove.
(struct dotlock_handle): Rename to msg_cb from info_cb, and
to msg_cb_arg from info_cb_value.
(default_msg_cb): New.
(read_lockfile): Use msg_cb and msg_cb_arg.
(dotlock_create_unix, dotlock_create_w32): Likewise.
(dotlock_take_unix, dotlock_take_w32): Likewise.
(dotlock_release_unix, dotlock_release_w32): Likewise.
(dotlock_release): Likewise.
(dotlock_create_with): New.
(dotlock_finish_create, dotlock_set_info_cb): Remove.
(dotlock_create): Use dotlock_create_with.
* common/dotlock.h (define dotlock_create_with): New.
(dotlock_finish_create, dotlock_set_info_cb): Remove.
(DOTLOCK_LOCKED_ALREADY, DOTLOCK_FATAL): New.
(DOTLOCK_PREPARE_CREATE): Remove.
* common/t-dotlock.c (lock_and_unlock): Use new internal API.
* kbx/backend-sqlite.c (create_or_open_database): Ditto.
  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on Nov 27 2025, 7:00 AM
Parents
rG7a2692fe5e58: tool:gpgtar: Check the output directory with --directory.
Branches
Unknown
Tags
Unknown