tools/libs/*: freebsd remove unused code
PATCH 1/1 tools/libs/*: freebsd remove unused code
"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 <[email protected]>
--- 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(-)
tools/libs/call/freebsd.c +0 -8
@@ -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)
tools/libs/evtchn/freebsd.c +1 -1
@@ -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;
tools/libs/foreignmemory/freebsd.c +0 -8
@@ -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)
Signature · 1 line
2.6.1
Quoted 6 lines · Ian Campbell
"
tools/libs/*: UseO_CLOEXECon 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 <[email protected]>
Acked-by Wei Liu <[email protected]>
Ian Campbell
AppliedQuoted 9 lines · Wei Liu
Quoted 6 lines · Ian Campbell
"
tools/libs/*: UseO_CLOEXECon 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 <[email protected]>Acked-by Wei Liu <[email protected]>
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).