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

dmeventd: no registering of 0 event mask

Whenever user tries to register 0 mask report this as EINVAL.
This commit is contained in:
Zdenek Kabelac 2015-10-22 11:10:57 +02:00
parent fa9e41d2e3
commit 9488cbdd0b

View File

@ -1472,6 +1472,8 @@ static int _handle_request(struct dm_event_daemon_message *msg,
{
switch (msg->cmd) {
case DM_EVENT_CMD_REGISTER_FOR_EVENT:
if (!message_data->events_field)
return -EINVAL;
return _register_for_event(message_data);
case DM_EVENT_CMD_UNREGISTER_FOR_EVENT:
return _unregister_for_event(message_data);