From: Jon Ludlam Date: Fri, 18 Jun 2010 13:32:23 +0000 (+0100) Subject: Move netdev from xen-api.hg into xen-api-libs.hg and make it into a ocamlfind library X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=3e1c16338735f155d6d7b5c5c21a33320196490d;p=xcp%2Fxen-api-libs.git Move netdev from xen-api.hg into xen-api-libs.hg and make it into a ocamlfind library Signed-off-by: Jon Ludlam diff -r 07f69949f0bf Makefile.in--- a/Makefile.in +++ b/Makefile.in @@ -37,6 +37,7 @@ allxen: ifeq ($(HAVE_XEN),1) $(MAKE) -C mmap + $(MAKE) -C netdev $(MAKE) -C xc $(MAKE) -C xb $(MAKE) -C xs @@ -74,6 +75,7 @@ installxen: ifeq ($(HAVE_XEN),1) $(MAKE) -C mmap install + $(MAKE) -C netdev install $(MAKE) -C xc install $(MAKE) -C xb install $(MAKE) -C xs install @@ -112,6 +114,7 @@ ifeq ($(HAVE_XEN),1) $(MAKE) -C eventchn uninstall $(MAKE) -C xsrpc uninstall + $(MAKE) -C netdev uninstall $(MAKE) -C xs uninstall $(MAKE) -C xb uninstall $(MAKE) -C xc uninstall @@ -162,6 +165,7 @@ $(MAKE) -C stunnel doc $(MAKE) -C xsrpc doc $(MAKE) -C mmap doc + $(MAKE) -C netdev doc $(MAKE) -C forking_executioner doc $(MAKE) -C mlvm doc $(MAKE) -C cpuid doc @@ -190,6 +194,7 @@ cleanxen: $(MAKE) -C mmap clean + $(MAKE) -C netdev clean $(MAKE) -C xc clean $(MAKE) -C xb clean $(MAKE) -C xs clean --- diff --git a/netdev/netdev.ml b/netdev/netdev.ml index 1f09409..768dd3b 100644 --- a/netdev/netdev.ml +++ b/netdev/netdev.ml @@ -397,13 +397,6 @@ let is_physical name = not(List.mem "xen-backend" (String.split '/' link)) with _ -> false -let get_bios_name name = - try - let output, _ = Forkhelpers.execute_command_get_output "/sbin/biosdevname" ["-i"; name] in - let output = String.strip String.isspace output in - output - with _ -> name - (* Dispatch network backend operations. *) let network_config_file = "/etc/xensource/network.conf" diff --git a/netdev/netdev.mli b/netdev/netdev.mli index 822d508..07ce719 100644 --- a/netdev/netdev.mli +++ b/netdev/netdev.mli @@ -131,13 +131,8 @@ val get_carrier : string -> bool (** Returns PCI vendor and device ID for network device. *) val get_ids : string -> string * string -(** Indicates whether the given interface is a physical interface. *) +(** Indicates whether the given interface is a physical interface *) val is_physical : string -> bool -(** Returns the device name of the given interface according to [biosdevname]. This is a name - * that is based on the BIOS name and should not be affected by changes in the Linux kernel or - * manual device renaming. *) -val get_bios_name : string -> string - -(** Dispatch operation to correct backend device. *) +(** Dispatch operation to correct backend device *) val network : network_ops diff --git a/xapi-libs.spec b/xapi-libs.spec index 8f7f104..794c8a9 100644 --- a/xapi-libs.spec +++ b/xapi-libs.spec @@ -273,6 +273,7 @@ rm -rf $RPM_BUILD_ROOT /usr/lib/ocaml/cpuid/cpuid.cmxa /usr/lib/ocaml/cpuid/dllcpuid_stubs.so /usr/lib/ocaml/cpuid/libcpuid_stubs.a + /usr/lib/ocaml/netdev/* /usr/lib/ocaml/eventchn/META /usr/lib/ocaml/eventchn/dlleventchn_stubs.so /usr/lib/ocaml/eventchn/eventchn.a