]> xenbits.xensource.com Git - xcp/xen-api-libs.git/log
xcp/xen-api-libs.git
15 years agoCP-706: add syslog facility option to xapi log.conf
Marcus Granado [Fri, 27 Nov 2009 17:22:45 +0000 (17:22 +0000)]
CP-706: add syslog facility option to xapi log.conf

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
15 years agoSwitch all xapi syslog logging back to 'daemon'.
Daniel Stodden [Wed, 25 Nov 2009 20:14:08 +0000 (12:14 -0800)]
Switch all xapi syslog logging back to 'daemon'.
Since messages to 'daemon' are written asynchronously again.

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
15 years ago[XIU]: add HVM and HAP flags to the hypercall simulator.
David Scott [Fri, 27 Nov 2009 22:51:15 +0000 (22:51 +0000)]
[XIU]: add HVM and HAP flags to the hypercall simulator.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoAdds functions "file_lines_{fold,iter}" to the Unixext module. These functions implem...
Jonathan Knowles [Fri, 20 Nov 2009 14:22:16 +0000 (14:22 +0000)]
Adds functions "file_lines_{fold,iter}" to the Unixext module. These functions implement the standard "fold" and "iter" functions for all the lines in a file.

Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
15 years agoModify the mk/Makefile to invoke autogen.sh && configure to generate the main Makefile.
David Scott [Wed, 11 Nov 2009 17:41:50 +0000 (17:41 +0000)]
Modify the mk/Makefile to invoke autogen.sh && configure to generate the main Makefile.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoAdd a trivial autogen.sh
David Scott [Wed, 11 Nov 2009 17:41:49 +0000 (17:41 +0000)]
Add a trivial autogen.sh

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoWork-around the missing XS_RESTRICT decl in xen-unstable
David Scott [Wed, 11 Nov 2009 17:41:49 +0000 (17:41 +0000)]
Work-around the missing XS_RESTRICT decl in xen-unstable

This message is only used by
http://xenbits.xen.org/xapi/qemu-xen-3.4.pq.hg?file/e89cb5405f51/depriv_qemu

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoUse autoconf to detect: xen headers; XS_RESTRICT in patchqueue; ocaml packages xmlm...
David Scott [Wed, 11 Nov 2009 17:41:48 +0000 (17:41 +0000)]
Use autoconf to detect: xen headers; XS_RESTRICT in patchqueue; ocaml packages xmlm, type-conf; libdevicemapper; and linux-specific CDROM ioctls.

Modify the xen-api-libs.hg master Makefile to conditionally compile only those libraries whose system dependencies are met. So we:
* don't compile the xen libraries (xc, xb etc) if xen/xen.h is missing
* don't compile the cdrom library if the linux ioctls are missing
* don't compile the xml-light2, rss libraries if xmlm is missing
* don't compile rpc-light if type-conv is missing
* don't compile camldm if libdevicemapper is missing

This makes it easier for these libs to be used by other tools which may not need (eg) the xen or devicemapper bindings. Note that xen-api.hg needs most of these so any missing library will lead to a xen-api.hg build failure.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoadd autoconf infrastructure, including the OCaml M4 macros
Anil Madhavapeddy [Fri, 6 Nov 2009 18:50:06 +0000 (10:50 -0800)]
add autoconf infrastructure, including the OCaml M4 macros

Signed-off-by: Anil Madhavapeddy <anil@recoil.org>
15 years ago[packaging] separate the normal Makefile from the one used to build the components...
Thomas Gazagnaire [Wed, 11 Nov 2009 17:41:47 +0000 (17:41 +0000)]
[packaging] separate the normal Makefile from the one used to build the components and create a bins target which build and install binaries (as closeandexec).

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years agorename the Sexpr module to Sexpr_TS to avoid a case-insensitivity conflict with the...
Anil Madhavapeddy [Tue, 3 Nov 2009 03:27:08 +0000 (20:27 -0700)]
rename the Sexpr module to Sexpr_TS to avoid a case-insensitivity conflict with the SExpr module

Signed-off-by: Anil Madhavapeddy <anil@recoil.org>
15 years agoRemove the statfs(3) stubs as they are not used in XAPI any more, and it assists...
Anil Madhavapeddy [Thu, 5 Nov 2009 02:44:57 +0000 (02:44 +0000)]
Remove the statfs(3) stubs as they are not used in XAPI any more, and it assists with non-Linux portability.

Signed-off-by: Anil Madhavapeddy <anil@recoil.org>
15 years agoRemove signal handler debug stubs for FPE/SEGV from stdext as they are not needed...
Anil Madhavapeddy [Wed, 4 Nov 2009 20:55:18 +0000 (20:55 +0000)]
Remove signal handler debug stubs for FPE/SEGV from stdext as they are not needed by XAPI any more

Signed-off-by: Anil Madhavapeddy <anil@recoil.org>
15 years agoExplicitly include the ocaml install location in the Makefile so that it works with...
Anil Madhavapeddy [Wed, 4 Nov 2009 20:50:54 +0000 (20:50 +0000)]
Explicitly include the ocaml install location in the Makefile so that it works with installs outside the search path also (e.g. MacPorts)

Signed-off-by: Anil Madhavapeddy <anil@recoil.org>
15 years ago[ocamldoc] Distinguish between libs and packs
Rob Hoes [Fri, 30 Oct 2009 12:50:42 +0000 (12:50 +0000)]
[ocamldoc] Distinguish between libs and packs

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
15 years agoSwitch all xapi syslog logging to 'local6' rather than 'daemon' (ie same as blktapcnt...
David Scott [Fri, 30 Oct 2009 12:50:07 +0000 (12:50 +0000)]
Switch all xapi syslog logging to 'local6' rather than 'daemon' (ie same as blktapcntrl is about to use). This allows us to (i) keep logging through syslog; but (ii) define in the syslog.conf whether the data is written synchronously or not.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCA-34200: audit-log should have info level
Marcus Granado [Thu, 29 Oct 2009 18:19:34 +0000 (18:19 +0000)]
CA-34200: audit-log should have info level

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
15 years ago[ocamldoc] Build-in Ocamldoc support
Rob Hoes [Wed, 28 Oct 2009 17:06:00 +0000 (17:06 +0000)]
[ocamldoc] Build-in Ocamldoc support

Typing 'make doc' will generate documentation for the libraries in xen-api-libs. The documentation is integrated in the xen-api documentation (the custom ocamldoc generator in xen-api.hg is used). This only works when xen-api.hg is present in myrepos and 'make doc' has been executed in it.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
15 years agoDrop the runtime lock while calling syslog() in case it blocks for a long time.
David Scott [Wed, 28 Oct 2009 17:02:04 +0000 (17:02 +0000)]
Drop the runtime lock while calling syslog() in case it blocks for a long time.

The effect of writing synchronously to /var/log/messages has become much more noticable ever since we moved to a kernel with a fixed fsync().

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years ago[refactoring] Create new targets for binary generated by components of xen-api-libs.hg
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] Create new targets for binary generated by components of xen-api-libs.hg

By default, these binaries will be installed on /opt/xensource/libexec

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] remove unused sha1 library (the one we use is in stdext)
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] remove unused sha1 library (the one we use is in stdext)

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] Update the main Makefile to build the new libraries
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] Update the main Makefile to build the new libraries

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] make the dependency to xs explicit
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] make the dependency to xs explicit

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] make the dependency to unix explicit
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] make the dependency to unix explicit

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] make the dependencies to mmap and uuid explicit
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] make the dependencies to mmap and uuid explicit

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] make the dependencies to mmap and uuid explicit
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] make the dependencies to mmap and uuid explicit

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] make the dependency to unix explicit
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] make the dependency to unix explicit

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] make the dependencies to unix and xb explicit
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] make the dependencies to unix and xb explicit

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] Move SExpr from xen-api.hg to xen-api-libs.hg
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] Move SExpr from xen-api.hg to xen-api-libs.hg

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] Move stunnel from xen-api.hg to xen-api-libs.hg
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] Move stunnel from xen-api.hg to xen-api-libs.hg

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] Move RSS from xen-api.hg to xen-api-libs.hg
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] Move RSS from xen-api.hg to xen-api-libs.hg

15 years ago[refactoring] Move pciutil from xen-api.hg to xen-api-libs.hg
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] Move pciutil from xen-api.hg to xen-api-libs.hg

15 years ago[refactoring] Move closeandexec from xen-api.hg to xen-api-libs.hg
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] Move closeandexec from xen-api.hg to xen-api-libs.hg

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] Move http-svr from xen-api.hg to xen-api-libs.hg
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] Move http-svr from xen-api.hg to xen-api-libs.hg

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] Move few files from xen-api.hg to xen-api-libs.hg/stdext
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] Move few files from xen-api.hg to xen-api-libs.hg/stdext

15 years ago[refactoring] Move xmlpp from xen-api.hg to xen-api-libs.hg/xml-light2
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] Move xmlpp from xen-api.hg to xen-api-libs.hg/xml-light2

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] make the dependency to unix explicit
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] make the dependency to unix explicit

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[refactoring] move debug.ml from xen-api.hg to xen-api-libs.hg/log
David Scott [Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)]
[refactoring] move debug.ml from xen-api.hg to xen-api-libs.hg/log

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[rpc-light] upgrade to use xmlm-1.0.1.
Thomas Gazagnaire [Fri, 16 Oct 2009 13:50:46 +0000 (14:50 +0100)]
[rpc-light] upgrade to use xmlm-1.0.1.

Lots of small changes, starts to become stable so include it in the build.

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[xmlm] upgrade to version 1.0.1
Thomas Gazagnaire [Fri, 16 Oct 2009 13:44:39 +0000 (14:44 +0100)]
[xmlm] upgrade to version 1.0.1

Patch from Vincent Hanquez + bugfixes from me.

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years agoCP-706: use iso8601-like string format in debug and audit logs
Marcus Granado [Fri, 16 Oct 2009 13:44:03 +0000 (14:44 +0100)]
CP-706: use iso8601-like string format in debug and audit logs

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
15 years ago[rpc-light] Add the marshalling/unmarshalling json code from xenclient.
Thomas Gazagnaire [Tue, 13 Oct 2009 11:05:40 +0000 (12:05 +0100)]
[rpc-light] Add the marshalling/unmarshalling json code from xenclient.

Tpc-light is not compiled by default, so that should not interfere with the build system.

Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
15 years ago[XENOPS]: add xc bindings for setting hpet, timer_mode, acpi_s_state etc
Jonathan Ludlam [Thu, 8 Oct 2009 17:17:00 +0000 (18:17 +0100)]
[XENOPS]: add xc bindings for setting hpet, timer_mode, acpi_s_state etc

Signed-off-by: Jonathan Ludlam <jonathan.ludlam@eu.citrix.com>
Acked-by: David Scott <dave.scott@eu.citrix.com>
15 years agoCP-706: transport the whole audit record line from slave to master
MarcusG [Wed, 7 Oct 2009 16:12:49 +0000 (17:12 +0100)]
CP-706: transport the whole audit record line from slave to master
Signed-off-by: MarcusG <marcusg@citrix.com>
15 years agoUnix.localtime should be gmtime for getting canonical utc time
MarcusG [Wed, 7 Oct 2009 16:12:49 +0000 (17:12 +0100)]
Unix.localtime should be gmtime for getting canonical utc time
Signed-off-by: MarcusG <marcusg@citrix.com>
15 years agoCP-1245: Function to be called by a daemonized process to keep alive
Rob Hoes [Mon, 5 Oct 2009 15:08:56 +0000 (16:08 +0100)]
CP-1245: Function to be called by a daemonized process to keep alive

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
15 years agoCA-28788: fix the 'atomic_write_to_file' function which always ended up setting the...
David Scott [Fri, 2 Oct 2009 17:22:52 +0000 (18:22 +0100)]
CA-28788: fix the 'atomic_write_to_file' function which always ended up setting the perms to 0o0 despite the face that it tries to set them to 0o644.

As AndyP points out, the 'temp_file_in_dir' function creates the file with 0o0 and Unix.open only uses the given permissions if it actually creates a file. Therefore we add a Unix.chmod to set the permissions we want.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years ago[CAPRI]: add sources to output of xen-api-libs build
David Scott [Mon, 28 Sep 2009 17:36:40 +0000 (18:36 +0100)]
[CAPRI]: add sources to output of xen-api-libs build

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years ago[CAPRI]: add (C)opyright notice and LGPL with static linking exception to *.c and *.h
David Scott [Fri, 25 Sep 2009 13:05:05 +0000 (14:05 +0100)]
[CAPRI]: add (C)opyright notice and LGPL with static linking exception to *.c and *.h

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years ago[CAPRI]: add (C)opyright notice and LGPL with static linking exception to .ml and...
David Scott [Fri, 25 Sep 2009 13:05:05 +0000 (14:05 +0100)]
[CAPRI]: add (C)opyright notice and LGPL with static linking exception to .ml and .mli files.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
15 years ago[CAPRI]: remove legacy per-file (C)opyright notices and author lines
David Scott [Fri, 25 Sep 2009 13:05:05 +0000 (14:05 +0100)]
[CAPRI]: remove legacy per-file (C)opyright notices and author lines

Signed-off-by: Dave Scott <dave.scott@eu.citrix.com>
15 years ago[prc-lihgt] do not compile rpc-light yet, as it seems to break the build system.
Thomas Gazagnaire [Wed, 16 Sep 2009 17:35:56 +0000 (18:35 +0100)]
[prc-lihgt] do not compile rpc-light yet, as it seems to break the build system.

15 years ago[rpc-light] Add xmlrpc.mli and rewrite Xmlrpc.to_string to use buffers instead of...
Thomas Gazagnaire [Wed, 16 Sep 2009 15:10:49 +0000 (16:10 +0100)]
[rpc-light] Add xmlrpc.mli and rewrite Xmlrpc.to_string to use buffers instead of concatenating strings.

15 years ago[rpc-light] fix a broken depency in the META file of xml-light2.
Thomas Gazagnaire [Wed, 16 Sep 2009 14:49:13 +0000 (15:49 +0100)]
[rpc-light] fix a broken depency in the META file of xml-light2.

15 years ago[rpc-light] Initial commit for rpc-light.
Thomas Gazagnaire [Wed, 16 Sep 2009 14:45:24 +0000 (15:45 +0100)]
[rpc-light] Initial commit for rpc-light.

Rpc-light is a camlp4 library to easily marshall and unmarshall ML types to and from different RPC values (at the moment, only XML-RPC conversions are implemented).

15 years ago[rpc-light] modify xml-light2 to expose few more accessors, in order to look much...
Thomas Gazagnaire [Wed, 16 Sep 2009 14:37:14 +0000 (15:37 +0100)]
[rpc-light] modify xml-light2 to expose few more accessors, in order to look much more like xml-light.

15 years agoSilly spelling mistake.
Magnus Therning [Tue, 7 Jul 2009 15:18:47 +0000 (16:18 +0100)]
Silly spelling mistake.

15 years agoAdding function to check whether a string is a UUID.
Magnus Therning [Tue, 7 Jul 2009 15:13:27 +0000 (16:13 +0100)]
Adding function to check whether a string is a UUID.

15 years agoadd functions to parse/unparse xml structures from/to bigbuffers.
Thomas Gazagnaire [Mon, 29 Jun 2009 19:38:43 +0000 (20:38 +0100)]
add functions to parse/unparse xml structures from/to bigbuffers.

15 years agoInitial import of hg.uk.xensource.com/carbon/trunk/api-libs.hg c/s 255:b95c318ded7c...
Xen hg user [Thu, 28 May 2009 11:05:33 +0000 (12:05 +0100)]
Initial import of hg.uk.xensource.com/carbon/trunk/api-libs.hg c/s 255:b95c318ded7c dated 'Thu May 28 12:05:33 2009 +0100'. Also add LICENSE and CREDITS file.

For reference here is the output of 'hg export 255':
...
# Node ID b95c318ded7ca1eb3ff556c472f51ff0bd6c649f
# Parent  44307a5cffbf4d78042683602596d6a4a8421417
...

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoFix the XCP makefile used to build an SRPM
Jonathan Ludlam [Wed, 29 Sep 2010 10:23:30 +0000 (11:23 +0100)]
Fix the XCP makefile used to build an SRPM

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
14 years ago[Tapctl.of_device x] now will throw an exception if [x] is not a device; or if [x...
David Scott [Mon, 23 Aug 2010 13:03:02 +0000 (14:03 +0100)]
[Tapctl.of_device x] now will throw an exception if [x] is not a device; or if [x] is a device owned by another driver.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoUpdates for the tap-ctl module: initial implementation of dummy mode.
Jon Ludlam [Mon, 23 Aug 2010 13:02:39 +0000 (14:02 +0100)]
Updates for the tap-ctl module: initial implementation of dummy mode.

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
14 years agoMove the handy 'substring' record type into the Zerocheck module.
David Scott [Mon, 23 Aug 2010 12:59:08 +0000 (13:59 +0100)]
Move the handy 'substring' record type into the Zerocheck module.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoAdds an int64ext module. This module includes a set of commonly-used operators that...
Jonathan Knowles [Mon, 23 Aug 2010 12:58:27 +0000 (13:58 +0100)]
Adds an int64ext module. This module includes a set of commonly-used operators that work with the int64 data type.

Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
14 years agoAdds a forward pipe operator to the higher-order function library. The forward pipe...
Jonathan Knowles [Mon, 23 Aug 2010 12:58:07 +0000 (13:58 +0100)]
Adds a forward pipe operator to the higher-order function library. The forward pipe operator facilitates left-to-right function composition.

Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
14 years agoFixes a bit of broken formatting in listext.ml.
Jonathan Knowles [Mon, 23 Aug 2010 12:56:55 +0000 (13:56 +0100)]
Fixes a bit of broken formatting in listext.ml.

Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
14 years agoThis patch allows future patches to independently add modules to stdext without causi...
Jonathan Knowles [Mon, 23 Aug 2010 12:56:54 +0000 (13:56 +0100)]
This patch allows future patches to independently add modules to stdext without causing conflicts.

Signed-off-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
14 years agoAdd some HTTP client code
David Scott [Mon, 23 Aug 2010 12:56:23 +0000 (13:56 +0100)]
Add some HTTP client code

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoFirst cut at a 'tapctl' module which wraps the 'tap-ctl' command
David Scott [Fri, 23 Jul 2010 16:46:18 +0000 (17:46 +0100)]
First cut at a 'tapctl' module which wraps the 'tap-ctl' command

(Original version by Jon Ludlam <jonathan.ludlam@eu.citrix.com>)
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoBindings to libvhd.
Jon Ludlam [Thu, 22 Jul 2010 14:37:45 +0000 (15:37 +0100)]
Bindings to libvhd.

This allows ocaml programs to manipulate VHD files suitable for use
with XCP/XenServer.

Sample usage:
Vhd.create filename virtual_size (Vhd.Ty_dynamic) (Vhdutil.max_size) [];
let uid = Vhd.with_vhd filename false Vhd.get_uid

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Acked-by: Dave Scott <dave.scott@eu.citrix.com>
14 years agoAdd functions Zerocheck.get_next{zero,nonzero} which can be used to detect sparseness...
David Scott [Wed, 21 Jul 2010 22:29:38 +0000 (23:29 +0100)]
Add functions Zerocheck.get_next{zero,nonzero} which can be used to detect sparseness (relatively efficiently). Both functions primarily use aligned unsigned int-sized accesses.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoAdd new modules: lazyList, extentlistSet, set_test to stdext
David Scott [Wed, 21 Jul 2010 22:29:15 +0000 (23:29 +0100)]
Add new modules: lazyList, extentlistSet, set_test to stdext

lazyList contains a simple lazy list implementation.
extentlistSet contains a Set implementation where elements are stored as a list of (start, length) pairs
set_test contains functions to test a set implementation

extentlistset_test contains test cases for extentlistSet using set_test.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoFix the source manifest generation by using a simple shell script to scan the SRPMS...
David Scott [Mon, 12 Jul 2010 07:33:28 +0000 (08:33 +0100)]
Fix the source manifest generation by using a simple shell script to scan the SRPMS, rather than a hideous make/shell fragment.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agotrivial fix.remove duplicate include
Yang Hongyang [Thu, 8 Jul 2010 15:49:16 +0000 (16:49 +0100)]
trivial fix.remove duplicate include

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
14 years agoThe checksumming for meta-data of mlvm now agrees with the original lvm.
Matthias Goergens [Thu, 8 Jul 2010 14:02:27 +0000 (15:02 +0100)]
The checksumming for meta-data of mlvm now agrees with the original lvm.

Signed-off-by: Matthias Goergens <matthias.goergens@citrix.com>
14 years agoCA-38567: Fail Unixext calls with a proper Unix_error.
Daniel Stodden [Thu, 8 Jul 2010 14:00:49 +0000 (15:00 +0100)]
CA-38567: Fail Unixext calls with a proper Unix_error.

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
14 years agoMinor improvements to Stdext (Listext, Either, Fun, and Opt).
Rok Strnisa [Thu, 8 Jul 2010 13:59:21 +0000 (14:59 +0100)]
Minor improvements to Stdext (Listext, Either, Fun, and Opt).

REQUIRED FOR:
This patch is required for the 'encrypt-vm-migrate' patch in xen-api.hg.

Signed-off-by: Rok Strnisa <rok.strnisa@citrix.com>
14 years agoAdd stdext either/os built modules to RPM specfile
David Scott [Fri, 18 Jun 2010 16:49:32 +0000 (17:49 +0100)]
Add stdext either/os built modules to RPM specfile

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
14 years agoAdd biosdevname call to Netdev
Rob Hoes [Fri, 18 Jun 2010 13:32:23 +0000 (14:32 +0100)]
Add biosdevname call to Netdev

biosdevname is a tool used to find out the "real" device name of a network interface, according to the BIOS. This name is not affected by manual device renaming or changes in the Linux kernel.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
diff -r 96761a1835c1 netdev/netdev.ml--- a/netdev/netdev.ml
+++ b/netdev/netdev.ml
@@ -397,6 +397,13 @@
  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"

14 years agoMove netdev from xen-api.hg into xen-api-libs.hg and make it into a ocamlfind library
Jon Ludlam [Fri, 18 Jun 2010 13:32:23 +0000 (14:32 +0100)]
Move netdev from xen-api.hg into xen-api-libs.hg and make it into a ocamlfind library

Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
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

14 years agoChange the 'close' field in the request record to be mutable rather than a reference
Jon Ludlam [Fri, 18 Jun 2010 13:13:26 +0000 (14:13 +0100)]
Change the 'close' field in the request record to be mutable rather than a reference

Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
diff -r d8eb3fec758c http-svr/Makefile--- a/http-svr/Makefile Mon Mar 15 11:57:11 2010 +0000
+++ b/http-svr/Makefile Mon Mar 15 12:01:14 2010 +0000
@@ -8,6 +8,8 @@
 VERSION := $(shell hg parents --template "{rev}" 2>/dev/null || echo 0.0)
 OCAMLOPTFLAGS = -g -dtypes

+PP = camlp4o -I ../rpc-light -I $(shell ocamlfind query type-conv) pa_type_conv.cmo pa_rpc.cma
+
 OCAMLABI := $(shell ocamlc -version)
 OCAMLLIBDIR := $(shell ocamlc -where)
 OCAMLDESTDIR ?= $(OCAMLLIBDIR)
@@ -31,13 +33,13 @@
  $(OCAMLC) -a -o $@ $(foreach obj,$(OBJS),$(obj).cmo)

 %.cmo: %.ml %.cmi
- $(OCAMLC) -c -thread -I ../stdext -I ../log -o $@ $<
+ $(OCAMLC) -c -pp '${PP}' -thread -I ../rpc-light -I ../stdext -I ../log -o $@ $<

 %.cmi: %.mli
- $(OCAMLC) -c -thread -o $@ $<
+ $(OCAMLC) -c -I ../rpc-light -thread -o $@ $<

 %.cmx: %.ml %.cmi
- $(OCAMLOPT) $(OCAMLOPTFLAGS) -c -thread -I ../stdext -I ../log -o $@ $<
+ $(OCAMLOPT) $(OCAMLOPTFLAGS) -pp '${PP}' -c -thread -I ../rpc-light -I ../stdext -I ../log -o $@ $<

 %.o: %.c
  $(CC) $(CFLAGS) -c -o $@ $<

14 years agoAdd biosdevname call to Netdev
Rob Hoes [Fri, 18 Jun 2010 13:32:23 +0000 (14:32 +0100)]
Add biosdevname call to Netdev

biosdevname is a tool used to find out the "real" device name of a network interface, according to the BIOS. This name is not affected by manual device renaming or changes in the Linux kernel.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
diff -r 96761a1835c1 netdev/netdev.ml--- a/netdev/netdev.ml
+++ b/netdev/netdev.ml
@@ -397,6 +397,13 @@
  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"

14 years agoMove netdev from xen-api.hg into xen-api-libs.hg and make it into a ocamlfind library
Jon Ludlam [Fri, 18 Jun 2010 13:32:23 +0000 (14:32 +0100)]
Move netdev from xen-api.hg into xen-api-libs.hg and make it into a ocamlfind library

Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
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

14 years agoChange the 'close' field in the request record to be mutable rather than a reference
Jon Ludlam [Fri, 18 Jun 2010 13:13:26 +0000 (14:13 +0100)]
Change the 'close' field in the request record to be mutable rather than a reference

Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
diff -r d8eb3fec758c http-svr/Makefile--- a/http-svr/Makefile Mon Mar 15 11:57:11 2010 +0000
+++ b/http-svr/Makefile Mon Mar 15 12:01:14 2010 +0000
@@ -8,6 +8,8 @@
 VERSION := $(shell hg parents --template "{rev}" 2>/dev/null || echo 0.0)
 OCAMLOPTFLAGS = -g -dtypes

+PP = camlp4o -I ../rpc-light -I $(shell ocamlfind query type-conv) pa_type_conv.cmo pa_rpc.cma
+
 OCAMLABI := $(shell ocamlc -version)
 OCAMLLIBDIR := $(shell ocamlc -where)
 OCAMLDESTDIR ?= $(OCAMLLIBDIR)
@@ -31,13 +33,13 @@
  $(OCAMLC) -a -o $@ $(foreach obj,$(OBJS),$(obj).cmo)

 %.cmo: %.ml %.cmi
- $(OCAMLC) -c -thread -I ../stdext -I ../log -o $@ $<
+ $(OCAMLC) -c -pp '${PP}' -thread -I ../rpc-light -I ../stdext -I ../log -o $@ $<

 %.cmi: %.mli
- $(OCAMLC) -c -thread -o $@ $<
+ $(OCAMLC) -c -I ../rpc-light -thread -o $@ $<

 %.cmx: %.ml %.cmi
- $(OCAMLOPT) $(OCAMLOPTFLAGS) -c -thread -I ../stdext -I ../log -o $@ $<
+ $(OCAMLOPT) $(OCAMLOPTFLAGS) -pp '${PP}' -c -thread -I ../rpc-light -I ../stdext -I ../log -o $@ $<

 %.o: %.c
  $(CC) $(CFLAGS) -c -o $@ $<

14 years agoMake ocamldoc work with custom syntax within xen-api-libs.
Rok Strnisa [Thu, 17 Jun 2010 21:16:18 +0000 (22:16 +0100)]
Make ocamldoc work with custom syntax within xen-api-libs.

signed-off-by: Rok Strnisa <rok.strnisa@citrix.com>

14 years agomlvm/redo.ml was rid of a warning
Matthias Goergens [Thu, 17 Jun 2010 21:16:18 +0000 (22:16 +0100)]
mlvm/redo.ml was rid of a warning

Signed-off-by: Matthias Goergens <matthias.goergens@citrix.com>
14 years agovg.ml was rid of warnings.
Matthias Goergens [Thu, 17 Jun 2010 21:16:18 +0000 (22:16 +0100)]
vg.ml was rid of warnings.

Signed-off-by: Matthias Goergens <matthias.goergens@citrix.com>
14 years agocomment on constants on mlvm/constants.ml
Matthias Goergens [Thu, 17 Jun 2010 21:16:18 +0000 (22:16 +0100)]
comment on constants on mlvm/constants.ml

Signed-off-by: Matthias Goergens <matthias.goergens@citrix.com>
14 years agocamldm/camldm_stubs.c: Camldm.status can deal with empty tables, now. (+comment)
Matthias Goergens [Thu, 17 Jun 2010 21:16:18 +0000 (22:16 +0100)]
camldm/camldm_stubs.c: Camldm.status can deal with empty tables, now. (+comment)

Signed-off-by: Matthias Goergens <matthias.goergens@citrix.com>
14 years agocamldm_stubs.c: removed some debugging messages
Matthias Goergens [Thu, 17 Jun 2010 21:16:18 +0000 (22:16 +0100)]
camldm_stubs.c: removed some debugging messages

Signed-off-by: Matthias Goergens <matthias.goergens@citrix.com>
14 years agocamldm/camldm_stubs.c: removed whitespace
Matthias Goergens [Thu, 17 Jun 2010 21:16:18 +0000 (22:16 +0100)]
camldm/camldm_stubs.c: removed whitespace

Signed-off-by: Matthias Goergens <matthias.goergens@citrix.com>
14 years agoThose functions are of use outside of the original context, and nested functions
Matthias Goergens [Thu, 17 Jun 2010 21:16:18 +0000 (22:16 +0100)]
Those functions are of use outside of the original context, and nested functions
aren't really idiomatic C anyway.

Signed-off-by: Matthias Goergens <matthias.goergens@citrix.com>
14 years agocamldm/camldm_stubs.c: Tests have confirmed that camldm_ls does not leak memory.
Matthias Goergens [Thu, 17 Jun 2010 21:16:18 +0000 (22:16 +0100)]
camldm/camldm_stubs.c: Tests have confirmed that camldm_ls does not leak memory.

A comment in the file reflects this finding.

Signed-off-by: Matthias Goergens <matthias.goergens@citrix.com>
14 years agocamldm/camldm.ml: camldm_ls is an analogue to dmsetup ls.
Matthias Goergens [Thu, 17 Jun 2010 21:16:18 +0000 (22:16 +0100)]
camldm/camldm.ml: camldm_ls is an analogue to dmsetup ls.

Signed-off-by: Matthias Goergens <matthias.goergens@citrix.com>
14 years agocamldm/Makefile: OCAMLOPTFLAGS are now used
Matthias Goergens [Thu, 17 Jun 2010 21:16:18 +0000 (22:16 +0100)]
camldm/Makefile: OCAMLOPTFLAGS are now used

Signed-off-by: Matthias Goergens <matthias.goergens@citrix.com>
14 years agostdext/Either: A module for type ('a, 'b) t = Left of 'a | Right of 'b
Matthias Goergens [Thu, 17 Jun 2010 21:16:18 +0000 (22:16 +0100)]
stdext/Either: A module for type ('a, 'b) t = Left of 'a | Right of 'b
and helper functions.

Signed-off-by: Matthias Goergens <matthias.goergens@citrix.com>
14 years agoin stdext/Opt: Renamed cat_options to cat_some, to be more in line with the coming...
Matthias Goergens [Thu, 17 Jun 2010 21:16:18 +0000 (22:16 +0100)]
in stdext/Opt: Renamed cat_options to cat_some, to be more in line with the coming either module.

Signed-off-by: Matthias Goergens <Matthias.Goergens@citrix.com>
14 years agostdext/Listext got a function make_assoc to build Lisp-like assoc lists
Matthias Goergens [Thu, 17 Jun 2010 21:16:18 +0000 (22:16 +0100)]
stdext/Listext got a function make_assoc to build Lisp-like assoc lists

Signed-off-by: Matthias Goergens <Matthias.Goergens@citrix.com>
14 years agoExtended a comment in stdext/stringext.ml
Matthias Goergens [Thu, 17 Jun 2010 21:16:18 +0000 (22:16 +0100)]
Extended a comment in stdext/stringext.ml

Signed-off-by: Matthias Goergens <Matthias.Goergens@citrix.com>