* [PATCH] tools/libs/*: freebsd remove unused code
@ 2016-01-25 13:14 Ian Campbell
2016-01-25 13:27 ` Wei Liu
0 siblings, 1 reply; 3+ messages in thread
From: Ian Campbell @ 2016-01-25 13:14 UTC (permalink / raw)
To: roger.pau, ian.jackson, wei.liu2, xen-devel; +Cc: Ian Campbell
"tools/libs/*: Use O_CLOEXEC on Linux and FreeBSD" left some dead code
in the FreeBSD case, which breaks the build on that platform.
Also fix a typo "uint_32".
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
tools/libs/call/freebsd.c | 8 --------
tools/libs/evtchn/freebsd.c | 2 +-
tools/libs/foreignmemory/freebsd.c | 8 --------
3 files changed, 1 insertion(+), 17 deletions(-)
diff --git a/tools/libs/call/freebsd.c b/tools/libs/call/freebsd.c
index b3cbccd..cadd313 100644
--- a/tools/libs/call/freebsd.c
+++ b/tools/libs/call/freebsd.c
@@ -35,7 +35,6 @@
int osdep_xencall_open(xencall_handle *xcall)
{
- int saved_errno;
int fd = open(PRIVCMD_DEV, O_RDWR|O_CLOEXEC);
/*
@@ -53,13 +52,6 @@ int osdep_xencall_open(xencall_handle *xcall)
xcall->fd = fd;
return 0;
-
- error:
- saved_errno = errno;
- close(fd);
- errno = saved_errno;
-
- return -1;
}
int osdep_xencall_close(xencall_handle *xcall)
diff --git a/tools/libs/evtchn/freebsd.c b/tools/libs/evtchn/freebsd.c
index ddf221d..ead2e71 100644
--- a/tools/libs/evtchn/freebsd.c
+++ b/tools/libs/evtchn/freebsd.c
@@ -74,7 +74,7 @@ evtchn_port_or_error_t xenevtchn_bind_unbound_port(xenevtchn_handle *xce, uint32
}
evtchn_port_or_error_t
-xenevtchn_bind_interdomain(xenevtchn_handle *xce, uint_32 domid, evtchn_port_t remote_port)
+xenevtchn_bind_interdomain(xenevtchn_handle *xce, uint32_t domid, evtchn_port_t remote_port)
{
int ret, fd = xce->fd;
struct ioctl_evtchn_bind_interdomain bind;
diff --git a/tools/libs/foreignmemory/freebsd.c b/tools/libs/foreignmemory/freebsd.c
index 7bf3939..ef08b6c 100644
--- a/tools/libs/foreignmemory/freebsd.c
+++ b/tools/libs/foreignmemory/freebsd.c
@@ -33,7 +33,6 @@
int osdep_xenforeignmemory_open(xenforeignmemory_handle *fmem)
{
- int saved_errno;
int fd = open(PRIVCMD_DEV, O_RDWR|O_CLOEXEC);
if ( fd == -1 )
@@ -45,13 +44,6 @@ int osdep_xenforeignmemory_open(xenforeignmemory_handle *fmem)
fmem->fd = fd;
return 0;
-
- error:
- saved_errno = errno;
- close(fd);
- errno = saved_errno;
-
- return -1;
}
int osdep_xenforeignmemory_close(xenforeignmemory_handle *fmem)
--
2.6.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tools/libs/*: freebsd remove unused code
2016-01-25 13:14 [PATCH] tools/libs/*: freebsd remove unused code Ian Campbell
@ 2016-01-25 13:27 ` Wei Liu
2016-01-25 14:22 ` Ian Campbell
0 siblings, 1 reply; 3+ messages in thread
From: Wei Liu @ 2016-01-25 13:27 UTC (permalink / raw)
To: Ian Campbell; +Cc: wei.liu2, xen-devel, ian.jackson, roger.pau
On Mon, Jan 25, 2016 at 01:14:34PM +0000, Ian Campbell wrote:
> "tools/libs/*: Use O_CLOEXEC on Linux and FreeBSD" left some dead code
> in the FreeBSD case, which breaks the build on that platform.
>
> Also fix a typo "uint_32".
>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tools/libs/*: freebsd remove unused code
2016-01-25 13:27 ` Wei Liu
@ 2016-01-25 14:22 ` Ian Campbell
0 siblings, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2016-01-25 14:22 UTC (permalink / raw)
To: Wei Liu; +Cc: xen-devel, ian.jackson, roger.pau
On Mon, 2016-01-25 at 13:27 +0000, Wei Liu wrote:
> On Mon, Jan 25, 2016 at 01:14:34PM +0000, Ian Campbell wrote:
> > "tools/libs/*: Use O_CLOEXEC on Linux and FreeBSD" left some dead code
> > in the FreeBSD case, which breaks the build on that platform.
> >
> > Also fix a typo "uint_32".
> >
> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
>
> Acked-by: Wei Liu <wei.liu2@citrix.com>
Applied.
(FTR, I skipped my usual full set of usual pre-push build tests, since the
machines I use are unavailable right now. I have done an x86_64 make dist).
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-01-25 14:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-25 13:14 [PATCH] tools/libs/*: freebsd remove unused code Ian Campbell
2016-01-25 13:27 ` Wei Liu
2016-01-25 14:22 ` Ian Campbell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.