# HG changeset patch # User Rob Hoes # HG changeset patch # User Rob Hoes CP-1652: Move xen_cmdline module to xen-api-libs.hg Signed-off-by: Rob Hoes diff -r 0dc51a1485f8 ocaml/xapi/OMakefile --- a/ocaml/xapi/OMakefile Wed Feb 17 14:44:05 2010 +0000 +++ b/ocaml/xapi/OMakefile Wed Feb 17 14:53:39 2010 +0000 @@ -1,4 +1,4 @@ -OCAMLPACKS = xml-light2 cdrom pciutil sexpr log stunnel http-svr rss cpuid +OCAMLPACKS = xml-light2 cdrom pciutil sexpr log stunnel http-svr rss cpuid xen-utils OCAML_LIBS = ../util/version ../util/vm_memory_constraints ../util/sanitycheck ../util/stats \ ../idl/ocaml_backend/common ../idl/ocaml_backend/client ../idl/ocaml_backend/server ../util/ocamltest OCAMLINCLUDES = ../idl ../idl/ocaml_backend \ @@ -231,8 +231,7 @@ ../license/v6client \ bios_strings \ xapi_config \ - ../license/grace_retry \ - xen_cmdline + ../license/grace_retry OCamlProgram(xapi, $(XAPI_MODULES)) OCamlDocProgram(xapi, $(XAPI_MODULES)) diff -r 0dc51a1485f8 ocaml/xapi/xen_cmdline.ml --- a/ocaml/xapi/xen_cmdline.ml Wed Feb 17 14:44:05 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -(* - * Copyright (C) 2006-2009 Citrix Systems Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; version 2.1 only. with the special - * exception on linking described in file LICENSE. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - *) - -let xen_cmdline_script = "/opt/xensource/libexec/xen-cmdline" - -let call_script args = - try - let out, _ = Forkhelpers.execute_command_get_output xen_cmdline_script args in - out - with - | Forkhelpers.Spawn_internal_error(stderr, stdout, Unix.WEXITED n) -> - failwith "Error while calling xen-cmdline script" - -let list_cpuid_masks () = - call_script ["--list-cpuid-masks"] - -let set_cpuid_masks masks = - call_script ("--set-cpuid-masks" :: (List.map (fun (k,v) -> k ^ "=" ^ v) masks)) - -let delete_cpuid_masks masks = - List.map (fun mask -> call_script ("--delete-cpuid-masks" :: [mask])) masks