mirror of
https://github.com/ceph/ceph
synced 2024-12-16 08:26:25 +00:00
Librbd: fix return code of EventSocket init and notify
Signed-off-by: Haomai Wang <haomai@xsky.com>
This commit is contained in:
parent
d19deacc01
commit
c470e0bce3
@ -36,7 +36,7 @@ class EventSocket {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
return -EINVAL;
|
||||
}
|
||||
int notify() {
|
||||
int ret;
|
||||
@ -48,6 +48,8 @@ class EventSocket {
|
||||
ret = write(socket, buf, 1);
|
||||
if (ret < 0)
|
||||
ret = -errno;
|
||||
else
|
||||
ret = 0;
|
||||
}
|
||||
case EVENT_SOCKET_TYPE_EVENTFD:
|
||||
{
|
||||
@ -55,6 +57,8 @@ class EventSocket {
|
||||
ret = write(socket, &value, sizeof (value));
|
||||
if (ret < 0)
|
||||
ret = -errno;
|
||||
else
|
||||
ret = 0;
|
||||
}
|
||||
default:
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user