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

_register_dev_for_events to return error on failure

This commit is contained in:
Alasdair Kergon 2006-04-28 14:06:06 +00:00
parent 81b4308bde
commit e24e713001

View File

@ -594,12 +594,14 @@ static int _register_dev_for_events(struct cmd_context *cmd,
} else if (seg->segtype->ops->target_unregister_events)
reg = seg->segtype->ops->target_unregister_events;
if (reg)
if (!reg)
return_0;
/* FIXME specify events */
if (!reg(cmd->mem, seg, cmd->cft, 0)) {
stack;
return 0;
}
if (!reg(cmd->mem, seg, cmd->cft, 0)) {
stack;
return 0;
}
}
#endif
@ -642,6 +644,7 @@ static int _lv_suspend(struct cmd_context *cmd, const char *lvid_s,
}
if (!_register_dev_for_events(cmd, lv, 0))
/* FIXME Consider aborting here */
stack;
memlock_inc();