summaryrefslogtreecommitdiffstats
path: root/tools/lvm.c
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2002-02-11 15:42:34 +0000
committerAlasdair Kergon <agk@redhat.com>2002-02-11 15:42:34 +0000
commit7d0e6e800e41fd13a5dc51ef05de8298b30b7432 (patch)
tree51be3b97d6a751fed2fc643ce52dac6ad91f50ec /tools/lvm.c
parent713599407cc26d5e60889e828b923ed06f156ca0 (diff)
downloadlvm2-7d0e6e800e41fd13a5dc51ef05de8298b30b7432.tar.gz
lvm2-7d0e6e800e41fd13a5dc51ef05de8298b30b7432.tar.xz
lvm2-7d0e6e800e41fd13a5dc51ef05de8298b30b7432.zip
o Support locking with local lock files
o Disable control-c during updates (except if blocked waiting for a lock)
Diffstat (limited to 'tools/lvm.c')
-rw-r--r--tools/lvm.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/lvm.c b/tools/lvm.c
index c2f6f70f..a77db806 100644
--- a/tools/lvm.c
+++ b/tools/lvm.c
@@ -720,6 +720,7 @@ static char *_copy_command_line(struct pool *mem, int argc, char **argv)
static int run_command(int argc, char **argv)
{
int ret = 0;
+ int locking_type;
if (!(cmd->cmd_line = _copy_command_line(cmd->mem, argc, argv)))
return ECMD_FAILED;
@@ -739,8 +740,18 @@ static int run_command(int argc, char **argv)
_use_settings(&_current_settings);
+ locking_type = find_config_int(cmd->cf->root, "global/locking_type",
+ '/', 1);
+ if (!init_locking(locking_type, cmd->cf)) {
+ log_error("Locking type %d initialisation failed.",
+ locking_type);
+ return 0;
+ }
+
ret = the_command->fn(argc, argv);
+ fin_locking();
+
/*
* set the debug and verbose levels back
* to the global default. We have to do