1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Always return exit error status when locking of volume group fails.

This commit is contained in:
Milan Broz 2009-04-10 09:54:36 +00:00
parent 6ce8f8d553
commit 1b25b6e009
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.46 -
================================
Always return exit error status when locking of volume group fails.
Fix mirror log convert validation question.
Avoid referencing files from DESTDIR during build process.
Avoid creating some static libraries without static_link.

View File

@ -285,6 +285,7 @@ int process_each_lv(struct cmd_context *cmd, int argc, char **argv,
continue; /* FIXME Unnecessary? */
if (!lock_vol(cmd, vgname, lock_type)) {
log_error("Can't lock %s: skipping", vgname);
ret_max = ECMD_FAILED;
continue;
}
if (lock_type & LCK_WRITE)
@ -442,7 +443,7 @@ static int _process_one_vg(struct cmd_context *cmd, const char *vg_name,
if (!lock_vol(cmd, vg_name, lock_type)) {
log_error("Can't lock volume group %s: skipping", vg_name);
return ret_max;
return ECMD_FAILED;
}
log_verbose("Finding volume group \"%s\"", vg_name);
@ -745,6 +746,7 @@ int process_each_pv(struct cmd_context *cmd, int argc, char **argv,
dm_list_iterate_items(sll, vgnames) {
if (!lock_vol(cmd, sll->str, lock_type)) {
log_error("Can't lock %s: skipping", sll->str);
ret_max = ECMD_FAILED;
continue;
}
if (!(vg = vg_read_internal(cmd, sll->str, NULL, &consistent))) {