mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
_register_dev_for_events to return error on failure
This commit is contained in:
parent
81b4308bde
commit
e24e713001
@ -594,12 +594,14 @@ static int _register_dev_for_events(struct cmd_context *cmd,
|
|||||||
} else if (seg->segtype->ops->target_unregister_events)
|
} else if (seg->segtype->ops->target_unregister_events)
|
||||||
reg = seg->segtype->ops->target_unregister_events;
|
reg = seg->segtype->ops->target_unregister_events;
|
||||||
|
|
||||||
if (reg)
|
if (!reg)
|
||||||
|
return_0;
|
||||||
|
|
||||||
/* FIXME specify events */
|
/* FIXME specify events */
|
||||||
if (!reg(cmd->mem, seg, cmd->cft, 0)) {
|
if (!reg(cmd->mem, seg, cmd->cft, 0)) {
|
||||||
stack;
|
stack;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#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))
|
if (!_register_dev_for_events(cmd, lv, 0))
|
||||||
|
/* FIXME Consider aborting here */
|
||||||
stack;
|
stack;
|
||||||
|
|
||||||
memlock_inc();
|
memlock_inc();
|
||||||
|
Loading…
Reference in New Issue
Block a user