mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
tools/libs/evtchn: Deduplicate xenevtchn_fd()
struct xenevtchn_handle is common in private.h, meaning that xenevtchn_fd() has exactly one correct implementation. Implement it in core.c, rather than identically for each OS. This matches all other libraries (call, gnttab, gntshr) which implement an fd getter. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Juergen Gross <jgross@suse.com>
This commit is contained in:
1 parent
0cf6521ea9
commit
2e8aa1663c
6 files changed
+5
-25
No files matched your search
@@ -120,6 +120,11 @@ int xenevtchn_close(xenevtchn_handle *xce)
|
||||
return rc;
|
||||
}
|
||||
|
||||
int xenevtchn_fd(xenevtchn_handle *xce)
|
||||
{
|
||||
return xce->fd;
|
||||
}
|
||||
|
||||
int xenevtchn_restrict(xenevtchn_handle *xce, domid_t domid)
|
||||
{
|
||||
return osdep_evtchn_restrict(xce, domid);
|
||||
|
||||
@@ -63,11 +63,6 @@ int osdep_evtchn_restrict(xenevtchn_handle *xce, domid_t domid)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int xenevtchn_fd(xenevtchn_handle *xce)
|
||||
{
|
||||
return xce->fd;
|
||||
}
|
||||
|
||||
int xenevtchn_notify(xenevtchn_handle *xce, evtchn_port_t port)
|
||||
{
|
||||
int fd = xce->fd;
|
||||
|
||||
@@ -66,11 +66,6 @@ int osdep_evtchn_restrict(xenevtchn_handle *xce, domid_t domid)
|
||||
return ioctl(xce->fd, IOCTL_EVTCHN_RESTRICT_DOMID, &restrict_domid);
|
||||
}
|
||||
|
||||
int xenevtchn_fd(xenevtchn_handle *xce)
|
||||
{
|
||||
return xce->fd;
|
||||
}
|
||||
|
||||
int xenevtchn_notify(xenevtchn_handle *xce, evtchn_port_t port)
|
||||
{
|
||||
int fd = xce->fd;
|
||||
|
||||
@@ -112,11 +112,6 @@ void minios_evtchn_close_fd(int fd)
|
||||
files[fd].type = FTYPE_NONE;
|
||||
}
|
||||
|
||||
int xenevtchn_fd(xenevtchn_handle *xce)
|
||||
{
|
||||
return xce->fd;
|
||||
}
|
||||
|
||||
int xenevtchn_notify(xenevtchn_handle *xce, evtchn_port_t port)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -58,11 +58,6 @@ int osdep_evtchn_restrict(xenevtchn_handle *xce, domid_t domid)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int xenevtchn_fd(xenevtchn_handle *xce)
|
||||
{
|
||||
return xce->fd;
|
||||
}
|
||||
|
||||
int xenevtchn_notify(xenevtchn_handle *xce, evtchn_port_t port)
|
||||
{
|
||||
int fd = xce->fd;
|
||||
|
||||
@@ -57,11 +57,6 @@ int osdep_evtchn_restrict(xenevtchn_handle *xce, domid_t domid)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int xenevtchn_fd(xenevtchn_handle *xce)
|
||||
{
|
||||
return xce->fd;
|
||||
}
|
||||
|
||||
int xenevtchn_notify(xenevtchn_handle *xce, evtchn_port_t port)
|
||||
{
|
||||
int fd = xce->fd;
|
||||
|
||||