merge ocaml xenstored and dependencies
cover merge ocaml xenstored and dependencies
Add ocaml xenstored into xen as an alternative to C xenstored.
The goal is to choose it as the default xenstored on the target machine when it has been built.
build hook mechanism is not ideal, but should be safe for platform that cannot build ocaml and/or would have some portability issues.
This is RFC, although the first 5 patches are completly safe since they just introduce new files and hook with default =n the new files. only the 6th patch make the default to build ocaml tools with fallback if not available.
Vincent Hanquez (6):
add ocaml libs (xc/xb/xs/eventchn)
add ocaml xenstored
add compilation makefile to ocaml directory remove hook from external ocaml repository add ocaml tools to build if defined. default to n default ocaml tools config variable to y
Config.mk | 15 +- tools/Makefile | 23 +- tools/ocaml/Makefile | 36 + tools/ocaml/Makefile.rules | 93 ++ tools/ocaml/common.make | 28 + tools/ocaml/libs/eventchn/META.in | 4 + tools/ocaml/libs/eventchn/Makefile | 28 + tools/ocaml/libs/eventchn/eventchn.ml | 27 + tools/ocaml/libs/eventchn/eventchn.mli | 26 + tools/ocaml/libs/eventchn/eventchn_stubs.c | 173 ++++ tools/ocaml/libs/log/META.in | 4 + tools/ocaml/libs/log/Makefile | 43 + tools/ocaml/libs/log/log.ml | 258 +++++ tools/ocaml/libs/log/log.mli | 55 + tools/ocaml/libs/log/logs.ml | 197 ++++ tools/ocaml/libs/log/logs.mli | 46 + tools/ocaml/libs/log/syslog.ml | 26 + tools/ocaml/libs/log/syslog.mli | 41 + tools/ocaml/libs/log/syslog_stubs.c | 73 ++ tools/ocaml/libs/mmap/META.in | 4 + tools/ocaml/libs/mmap/Makefile | 27 + tools/ocaml/libs/mmap/mmap.ml | 31 + tools/ocaml/libs/mmap/mmap.mli | 28 + tools/ocaml/libs/mmap/mmap_stubs.c | 136 +++ tools/ocaml/libs/mmap/mmap_stubs.h | 33 + tools/ocaml/libs/stdext/META.in | 5 + tools/ocaml/libs/stdext/Makefile | 43 + tools/ocaml/libs/stdext/bigbuffer.ml | 90 ++ tools/ocaml/libs/stdext/bigbuffer.mli | 22 + tools/ocaml/libs/stdext/eventloop.ml | 357 +++++++ tools/ocaml/libs/stdext/eventloop.mli | 100 ++ tools/ocaml/libs/stdext/file.ml | 34 + tools/ocaml/libs/stdext/file.mli | 18 + tools/ocaml/libs/stdext/filenameext.ml | 33 + tools/ocaml/libs/stdext/filenameext.mli | 17 + tools/ocaml/libs/stdext/hashtblext.ml | 38 + tools/ocaml/libs/stdext/hashtblext.mli | 77 ++ tools/ocaml/libs/stdext/listext.ml | 27 + tools/ocaml/libs/stdext/listext.mli | 65 ++ tools/ocaml/libs/stdext/opt.ml | 48 + tools/ocaml/libs/stdext/opt.mli | 24 + tools/ocaml/libs/stdext/pervasiveext.ml | 61 ++ tools/ocaml/libs/stdext/pervasiveext.mli | 30 + tools/ocaml/libs/stdext/qring.ml | 161 +++ tools/ocaml/libs/stdext/qring.mli | 47 + tools/ocaml/libs/stdext/ring.ml | 109 ++ tools/ocaml/libs/stdext/ring.mli | 30 + tools/ocaml/libs/stdext/stringext.ml | 206 ++++ tools/ocaml/libs/stdext/stringext.mli | 108 ++ tools/ocaml/libs/stdext/threadext.ml | 212 ++++ tools/ocaml/libs/stdext/threadext.mli | 67 ++ tools/ocaml/libs/stdext/trie.ml | 182 ++++ tools/ocaml/libs/stdext/trie.mli | 60 ++ tools/ocaml/libs/stdext/unixext.ml | 437 ++++++++ tools/ocaml/libs/stdext/unixext.mli | 84 ++ tools/ocaml/libs/stdext/unixext_stubs.c | 304 ++++++ tools/ocaml/libs/stdext/vIO.ml | 250 +++++ tools/ocaml/libs/stdext/vIO.mli | 51 + tools/ocaml/libs/stdext/varmap.ml | 26 + tools/ocaml/libs/stdext/varmap.mli | 22 + tools/ocaml/libs/uuid/META.in | 4 + tools/ocaml/libs/uuid/Makefile | 26 + tools/ocaml/libs/uuid/uuid.ml | 88 ++ tools/ocaml/libs/uuid/uuid.mli | 53 + tools/ocaml/libs/xb/META.in | 4 + tools/ocaml/libs/xb/Makefile | 41 + tools/ocaml/libs/xb/op.ml | 84 ++ tools/ocaml/libs/xb/packet.ml | 50 + tools/ocaml/libs/xb/partial.ml | 44 + tools/ocaml/libs/xb/xb.ml | 189 ++++ tools/ocaml/libs/xb/xb.mli | 83 ++ tools/ocaml/libs/xb/xb_stubs.c | 74 ++ tools/ocaml/libs/xb/xs_ring.ml | 18 + tools/ocaml/libs/xb/xs_ring_stubs.c | 117 +++ tools/ocaml/libs/xc/META.in | 4 + tools/ocaml/libs/xc/Makefile | 28 + tools/ocaml/libs/xc/xc.h | 191 ++++ tools/ocaml/libs/xc/xc.ml | 340 +++++++ tools/ocaml/libs/xc/xc.mli | 196 ++++ tools/ocaml/libs/xc/xc_cpufeature.h | 116 +++ tools/ocaml/libs/xc/xc_cpuid.h | 285 ++++++ tools/ocaml/libs/xc/xc_e820.h | 20 + tools/ocaml/libs/xc/xc_lib.c | 1502 ++++++++++++++++++++++++++++ tools/ocaml/libs/xc/xc_stubs.c | 1170 ++++++++++++++++++++++ tools/ocaml/libs/xs/META.in | 4 + tools/ocaml/libs/xs/Makefile | 42 + tools/ocaml/libs/xs/queueop.ml | 73 ++ tools/ocaml/libs/xs/xs.ml | 170 ++++ tools/ocaml/libs/xs/xs.mli | 90 ++ tools/ocaml/libs/xs/xsraw.ml | 265 +++++ tools/ocaml/libs/xs/xsraw.mli | 60 ++ tools/ocaml/libs/xs/xst.ml | 61 ++ tools/ocaml/libs/xs/xst.mli | 30 + tools/ocaml/xenstored/Makefile | 54 + tools/ocaml/xenstored/config.ml | 112 ++ tools/ocaml/xenstored/connection.ml | 234 +++++ tools/ocaml/xenstored/connections.ml | 167 +++ tools/ocaml/xenstored/define.ml | 40 + tools/ocaml/xenstored/disk.ml | 157 +++ tools/ocaml/xenstored/domain.ml | 62 ++ tools/ocaml/xenstored/domains.ml | 84 ++ tools/ocaml/xenstored/event.ml | 29 + tools/ocaml/xenstored/logging.ml | 238 +++++ tools/ocaml/xenstored/parse_arg.ml | 68 ++ tools/ocaml/xenstored/perms.ml | 165 +++ tools/ocaml/xenstored/process.ml | 395 ++++++++ tools/ocaml/xenstored/quota.ml | 83 ++ tools/ocaml/xenstored/store.ml | 460 +++++++++ tools/ocaml/xenstored/symbol.ml | 76 ++ tools/ocaml/xenstored/symbol.mli | 52 + tools/ocaml/xenstored/transaction.ml | 197 ++++ tools/ocaml/xenstored/utils.ml | 107 ++ tools/ocaml/xenstored/xenstored.conf | 30 + tools/ocaml/xenstored/xenstored.ml | 404 ++++++++ tools/xenstore/Makefile | 5 - 115 files changed, 13609 insertions(+), 32 deletions(-) create mode 100644 tools/ocaml/Makefile create mode 100644 tools/ocaml/Makefile.rules create mode 100644 tools/ocaml/common.make create mode 100644 tools/ocaml/libs/eventchn/META.in create mode 100644 tools/ocaml/libs/eventchn/Makefile create mode 100644 tools/ocaml/libs/eventchn/eventchn.ml create mode 100644 tools/ocaml/libs/eventchn/eventchn.mli create mode 100644 tools/ocaml/libs/eventchn/eventchn_stubs.c create mode 100644 tools/ocaml/libs/log/META.in create mode 100644 tools/ocaml/libs/log/Makefile create mode 100644 tools/ocaml/libs/log/log.ml create mode 100644 tools/ocaml/libs/log/log.mli create mode 100644 tools/ocaml/libs/log/logs.ml create mode 100644 tools/ocaml/libs/log/logs.mli create mode 100644 tools/ocaml/libs/log/syslog.ml create mode 100644 tools/ocaml/libs/log/syslog.mli create mode 100644 tools/ocaml/libs/log/syslog_stubs.c create mode 100644 tools/ocaml/libs/mmap/META.in create mode 100644 tools/ocaml/libs/mmap/Makefile create mode 100644 tools/ocaml/libs/mmap/mmap.ml create mode 100644 tools/ocaml/libs/mmap/mmap.mli create mode 100644 tools/ocaml/libs/mmap/mmap_stubs.c create mode 100644 tools/ocaml/libs/mmap/mmap_stubs.h create mode 100644 tools/ocaml/libs/stdext/META.in create mode 100644 tools/ocaml/libs/stdext/Makefile create mode 100644 tools/ocaml/libs/stdext/bigbuffer.ml create mode 100644 tools/ocaml/libs/stdext/bigbuffer.mli create mode 100644 tools/ocaml/libs/stdext/eventloop.ml create mode 100644 tools/ocaml/libs/stdext/eventloop.mli create mode 100644 tools/ocaml/libs/stdext/file.ml create mode 100644 tools/ocaml/libs/stdext/file.mli create mode 100644 tools/ocaml/libs/stdext/filenameext.ml create mode 100644 tools/ocaml/libs/stdext/filenameext.mli create mode 100644 tools/ocaml/libs/stdext/hashtblext.ml create mode 100644 tools/ocaml/libs/stdext/hashtblext.mli create mode 100644 tools/ocaml/libs/stdext/listext.ml create mode 100644 tools/ocaml/libs/stdext/listext.mli create mode 100644 tools/ocaml/libs/stdext/opt.ml create mode 100644 tools/ocaml/libs/stdext/opt.mli create mode 100644 tools/ocaml/libs/stdext/pervasiveext.ml create mode 100644 tools/ocaml/libs/stdext/pervasiveext.mli create mode 100644 tools/ocaml/libs/stdext/qring.ml create mode 100644 tools/ocaml/libs/stdext/qring.mli create mode 100644 tools/ocaml/libs/stdext/ring.ml create mode 100644 tools/ocaml/libs/stdext/ring.mli create mode 100644 tools/ocaml/libs/stdext/stringext.ml create mode 100644 tools/ocaml/libs/stdext/stringext.mli create mode 100644 tools/ocaml/libs/stdext/threadext.ml create mode 100644 tools/ocaml/libs/stdext/threadext.mli create mode 100644 tools/ocaml/libs/stdext/trie.ml create mode 100644 tools/ocaml/libs/stdext/trie.mli create mode 100644 tools/ocaml/libs/stdext/unixext.ml create mode 100644 tools/ocaml/libs/stdext/unixext.mli create mode 100644 tools/ocaml/libs/stdext/unixext_stubs.c create mode 100644 tools/ocaml/libs/stdext/vIO.ml create mode 100644 tools/ocaml/libs/stdext/vIO.mli create mode 100644 tools/ocaml/libs/stdext/varmap.ml create mode 100644 tools/ocaml/libs/stdext/varmap.mli create mode 100644 tools/ocaml/libs/uuid/META.in create mode 100644 tools/ocaml/libs/uuid/Makefile create mode 100644 tools/ocaml/libs/uuid/uuid.ml create mode 100644 tools/ocaml/libs/uuid/uuid.mli create mode 100644 tools/ocaml/libs/xb/META.in create mode 100644 tools/ocaml/libs/xb/Makefile create mode 100644 tools/ocaml/libs/xb/op.ml create mode 100644 tools/ocaml/libs/xb/packet.ml create mode 100644 tools/ocaml/libs/xb/partial.ml create mode 100644 tools/ocaml/libs/xb/xb.ml create mode 100644 tools/ocaml/libs/xb/xb.mli create mode 100644 tools/ocaml/libs/xb/xb_stubs.c create mode 100644 tools/ocaml/libs/xb/xs_ring.ml create mode 100644 tools/ocaml/libs/xb/xs_ring_stubs.c create mode 100644 tools/ocaml/libs/xc/META.in create mode 100644 tools/ocaml/libs/xc/Makefile create mode 100644 tools/ocaml/libs/xc/xc.h create mode 100644 tools/ocaml/libs/xc/xc.ml create mode 100644 tools/ocaml/libs/xc/xc.mli create mode 100644 tools/ocaml/libs/xc/xc_cpufeature.h create mode 100644 tools/ocaml/libs/xc/xc_cpuid.h create mode 100644 tools/ocaml/libs/xc/xc_e820.h create mode 100644 tools/ocaml/libs/xc/xc_lib.c create mode 100644 tools/ocaml/libs/xc/xc_stubs.c create mode 100644 tools/ocaml/libs/xs/META.in create mode 100644 tools/ocaml/libs/xs/Makefile create mode 100644 tools/ocaml/libs/xs/queueop.ml create mode 100644 tools/ocaml/libs/xs/xs.ml create mode 100644 tools/ocaml/libs/xs/xs.mli create mode 100644 tools/ocaml/libs/xs/xsraw.ml create mode 100644 tools/ocaml/libs/xs/xsraw.mli create mode 100644 tools/ocaml/libs/xs/xst.ml create mode 100644 tools/ocaml/libs/xs/xst.mli create mode 100644 tools/ocaml/xenstored/Makefile create mode 100644 tools/ocaml/xenstored/config.ml create mode 100644 tools/ocaml/xenstored/connection.ml create mode 100644 tools/ocaml/xenstored/connections.ml create mode 100644 tools/ocaml/xenstored/define.ml create mode 100644 tools/ocaml/xenstored/disk.ml create mode 100644 tools/ocaml/xenstored/domain.ml create mode 100644 tools/ocaml/xenstored/domains.ml create mode 100644 tools/ocaml/xenstored/event.ml create mode 100644 tools/ocaml/xenstored/logging.ml create mode 100644 tools/ocaml/xenstored/parse_arg.ml create mode 100644 tools/ocaml/xenstored/perms.ml create mode 100644 tools/ocaml/xenstored/process.ml create mode 100644 tools/ocaml/xenstored/quota.ml create mode 100644 tools/ocaml/xenstored/store.ml create mode 100644 tools/ocaml/xenstored/symbol.ml create mode 100644 tools/ocaml/xenstored/symbol.mli create mode 100644 tools/ocaml/xenstored/transaction.ml create mode 100644 tools/ocaml/xenstored/utils.ml create mode 100644 tools/ocaml/xenstored/xenstored.conf create mode 100644 tools/ocaml/xenstored/xenstored.ml
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
PATCH 1/6 add ocaml libs (xc/xb/xs/eventchn)
--- tools/ocaml/libs/eventchn/META.in | 4 + tools/ocaml/libs/eventchn/Makefile | 28 + tools/ocaml/libs/eventchn/eventchn.ml | 27 + tools/ocaml/libs/eventchn/eventchn.mli | 26 + tools/ocaml/libs/eventchn/eventchn_stubs.c | 173 ++++ tools/ocaml/libs/log/META.in | 4 + tools/ocaml/libs/log/Makefile | 43 + tools/ocaml/libs/log/log.ml | 258 +++++ tools/ocaml/libs/log/log.mli | 55 + tools/ocaml/libs/log/logs.ml | 197 ++++ tools/ocaml/libs/log/logs.mli | 46 + tools/ocaml/libs/log/syslog.ml | 26 + tools/ocaml/libs/log/syslog.mli | 41 + tools/ocaml/libs/log/syslog_stubs.c | 73 ++ tools/ocaml/libs/mmap/META.in | 4 + tools/ocaml/libs/mmap/Makefile | 27 + tools/ocaml/libs/mmap/mmap.ml | 31 + tools/ocaml/libs/mmap/mmap.mli | 28 + tools/ocaml/libs/mmap/mmap_stubs.c | 136 +++ tools/ocaml/libs/mmap/mmap_stubs.h | 33 + tools/ocaml/libs/stdext/META.in | 5 + tools/ocaml/libs/stdext/Makefile | 43 + tools/ocaml/libs/stdext/bigbuffer.ml | 90 ++ tools/ocaml/libs/stdext/bigbuffer.mli | 22 + tools/ocaml/libs/stdext/eventloop.ml | 357 +++++++ tools/ocaml/libs/stdext/eventloop.mli | 100 ++ tools/ocaml/libs/stdext/file.ml | 34 + tools/ocaml/libs/stdext/file.mli | 18 + tools/ocaml/libs/stdext/filenameext.ml | 33 + tools/ocaml/libs/stdext/filenameext.mli | 17 + tools/ocaml/libs/stdext/hashtblext.ml | 38 + tools/ocaml/libs/stdext/hashtblext.mli | 77 ++ tools/ocaml/libs/stdext/listext.ml | 27 + tools/ocaml/libs/stdext/listext.mli | 65 ++ tools/ocaml/libs/stdext/opt.ml | 48 + tools/ocaml/libs/stdext/opt.mli | 24 + tools/ocaml/libs/stdext/pervasiveext.ml | 61 ++ tools/ocaml/libs/stdext/pervasiveext.mli | 30 + tools/ocaml/libs/stdext/qring.ml | 161 +++ tools/ocaml/libs/stdext/qring.mli | 47 + tools/ocaml/libs/stdext/ring.ml | 109 ++ tools/ocaml/libs/stdext/ring.mli | 30 + tools/ocaml/libs/stdext/stringext.ml | 206 ++++ tools/ocaml/libs/stdext/stringext.mli | 108 ++ tools/ocaml/libs/stdext/threadext.ml | 212 ++++ tools/ocaml/libs/stdext/threadext.mli | 67 ++ tools/ocaml/libs/stdext/trie.ml | 182 ++++ tools/ocaml/libs/stdext/trie.mli | 60 ++ tools/ocaml/libs/stdext/unixext.ml | 437 ++++++++ tools/ocaml/libs/stdext/unixext.mli | 84 ++ tools/ocaml/libs/stdext/unixext_stubs.c | 304 ++++++ tools/ocaml/libs/stdext/vIO.ml | 250 +++++ tools/ocaml/libs/stdext/vIO.mli | 51 + tools/ocaml/libs/stdext/varmap.ml | 26 + tools/ocaml/libs/stdext/varmap.mli | 22 + tools/ocaml/libs/uuid/META.in | 4 + tools/ocaml/libs/uuid/Makefile | 26 + tools/ocaml/libs/uuid/uuid.ml | 88 ++ tools/ocaml/libs/uuid/uuid.mli | 53 + tools/ocaml/libs/xb/META.in | 4 + tools/ocaml/libs/xb/Makefile | 41 + tools/ocaml/libs/xb/op.ml | 84 ++ tools/ocaml/libs/xb/packet.ml | 50 + tools/ocaml/libs/xb/partial.ml | 44 + tools/ocaml/libs/xb/xb.ml | 189 ++++ tools/ocaml/libs/xb/xb.mli | 83 ++ tools/ocaml/libs/xb/xb_stubs.c | 74 ++ tools/ocaml/libs/xb/xs_ring.ml | 18 + tools/ocaml/libs/xb/xs_ring_stubs.c | 117 +++ tools/ocaml/libs/xc/META.in | 4 + tools/ocaml/libs/xc/Makefile | 28 + tools/ocaml/libs/xc/xc.h | 191 ++++ tools/ocaml/libs/xc/xc.ml | 340 +++++++ tools/ocaml/libs/xc/xc.mli | 196 ++++ tools/ocaml/libs/xc/xc_cpufeature.h | 116 +++ tools/ocaml/libs/xc/xc_cpuid.h | 285 ++++++ tools/ocaml/libs/xc/xc_e820.h | 20 + tools/ocaml/libs/xc/xc_lib.c | 1502 ++++++++++++++++++++++++++++ tools/ocaml/libs/xc/xc_stubs.c | 1170 ++++++++++++++++++++++ tools/ocaml/libs/xs/META.in | 4 + tools/ocaml/libs/xs/Makefile | 42 + tools/ocaml/libs/xs/queueop.ml | 73 ++ tools/ocaml/libs/xs/xs.ml | 170 ++++ tools/ocaml/libs/xs/xs.mli | 90 ++ tools/ocaml/libs/xs/xsraw.ml | 265 +++++ tools/ocaml/libs/xs/xsraw.mli | 60 ++ tools/ocaml/libs/xs/xst.ml | 61 ++ tools/ocaml/libs/xs/xst.mli | 30 + 88 files changed, 10227 insertions(+), 0 deletions(-) create mode 100644 tools/ocaml/libs/eventchn/META.in create mode 100644 tools/ocaml/libs/eventchn/Makefile create mode 100644 tools/ocaml/libs/eventchn/eventchn.ml create mode 100644 tools/ocaml/libs/eventchn/eventchn.mli create mode 100644 tools/ocaml/libs/eventchn/eventchn_stubs.c create mode 100644 tools/ocaml/libs/log/META.in create mode 100644 tools/ocaml/libs/log/Makefile create mode 100644 tools/ocaml/libs/log/log.ml create mode 100644 tools/ocaml/libs/log/log.mli create mode 100644 tools/ocaml/libs/log/logs.ml create mode 100644 tools/ocaml/libs/log/logs.mli create mode 100644 tools/ocaml/libs/log/syslog.ml create mode 100644 tools/ocaml/libs/log/syslog.mli create mode 100644 tools/ocaml/libs/log/syslog_stubs.c create mode 100644 tools/ocaml/libs/mmap/META.in create mode 100644 tools/ocaml/libs/mmap/Makefile create mode 100644 tools/ocaml/libs/mmap/mmap.ml create mode 100644 tools/ocaml/libs/mmap/mmap.mli create mode 100644 tools/ocaml/libs/mmap/mmap_stubs.c create mode 100644 tools/ocaml/libs/mmap/mmap_stubs.h create mode 100644 tools/ocaml/libs/stdext/META.in create mode 100644 tools/ocaml/libs/stdext/Makefile create mode 100644 tools/ocaml/libs/stdext/bigbuffer.ml create mode 100644 tools/ocaml/libs/stdext/bigbuffer.mli create mode 100644 tools/ocaml/libs/stdext/eventloop.ml create mode 100644 tools/ocaml/libs/stdext/eventloop.mli create mode 100644 tools/ocaml/libs/stdext/file.ml create mode 100644 tools/ocaml/libs/stdext/file.mli create mode 100644 tools/ocaml/libs/stdext/filenameext.ml create mode 100644 tools/ocaml/libs/stdext/filenameext.mli create mode 100644 tools/ocaml/libs/stdext/hashtblext.ml create mode 100644 tools/ocaml/libs/stdext/hashtblext.mli create mode 100644 tools/ocaml/libs/stdext/listext.ml create mode 100644 tools/ocaml/libs/stdext/listext.mli create mode 100644 tools/ocaml/libs/stdext/opt.ml create mode 100644 tools/ocaml/libs/stdext/opt.mli create mode 100644 tools/ocaml/libs/stdext/pervasiveext.ml create mode 100644 tools/ocaml/libs/stdext/pervasiveext.mli create mode 100644 tools/ocaml/libs/stdext/qring.ml create mode 100644 tools/ocaml/libs/stdext/qring.mli create mode 100644 tools/ocaml/libs/stdext/ring.ml create mode 100644 tools/ocaml/libs/stdext/ring.mli create mode 100644 tools/ocaml/libs/stdext/stringext.ml create mode 100644 tools/ocaml/libs/stdext/stringext.mli create mode 100644 tools/ocaml/libs/stdext/threadext.ml create mode 100644 tools/ocaml/libs/stdext/threadext.mli create mode 100644 tools/ocaml/libs/stdext/trie.ml create mode 100644 tools/ocaml/libs/stdext/trie.mli create mode 100644 tools/ocaml/libs/stdext/unixext.ml create mode 100644 tools/ocaml/libs/stdext/unixext.mli create mode 100644 tools/ocaml/libs/stdext/unixext_stubs.c create mode 100644 tools/ocaml/libs/stdext/vIO.ml create mode 100644 tools/ocaml/libs/stdext/vIO.mli create mode 100644 tools/ocaml/libs/stdext/varmap.ml create mode 100644 tools/ocaml/libs/stdext/varmap.mli create mode 100644 tools/ocaml/libs/uuid/META.in create mode 100644 tools/ocaml/libs/uuid/Makefile create mode 100644 tools/ocaml/libs/uuid/uuid.ml create mode 100644 tools/ocaml/libs/uuid/uuid.mli create mode 100644 tools/ocaml/libs/xb/META.in create mode 100644 tools/ocaml/libs/xb/Makefile create mode 100644 tools/ocaml/libs/xb/op.ml create mode 100644 tools/ocaml/libs/xb/packet.ml create mode 100644 tools/ocaml/libs/xb/partial.ml create mode 100644 tools/ocaml/libs/xb/xb.ml create mode 100644 tools/ocaml/libs/xb/xb.mli create mode 100644 tools/ocaml/libs/xb/xb_stubs.c create mode 100644 tools/ocaml/libs/xb/xs_ring.ml create mode 100644 tools/ocaml/libs/xb/xs_ring_stubs.c create mode 100644 tools/ocaml/libs/xc/META.in create mode 100644 tools/ocaml/libs/xc/Makefile create mode 100644 tools/ocaml/libs/xc/xc.h create mode 100644 tools/ocaml/libs/xc/xc.ml create mode 100644 tools/ocaml/libs/xc/xc.mli create mode 100644 tools/ocaml/libs/xc/xc_cpufeature.h create mode 100644 tools/ocaml/libs/xc/xc_cpuid.h create mode 100644 tools/ocaml/libs/xc/xc_e820.h create mode 100644 tools/ocaml/libs/xc/xc_lib.c create mode 100644 tools/ocaml/libs/xc/xc_stubs.c create mode 100644 tools/ocaml/libs/xs/META.in create mode 100644 tools/ocaml/libs/xs/Makefile create mode 100644 tools/ocaml/libs/xs/queueop.ml create mode 100644 tools/ocaml/libs/xs/xs.ml create mode 100644 tools/ocaml/libs/xs/xs.mli create mode 100644 tools/ocaml/libs/xs/xsraw.ml create mode 100644 tools/ocaml/libs/xs/xsraw.mli create mode 100644 tools/ocaml/libs/xs/xst.ml create mode 100644 tools/ocaml/libs/xs/xst.mli
tools/ocaml/libs/eventchn/META.in new file +4 -0
@@ -0,0 +1,4 @@ +version = "@VERSION@" +description = "Eventchn interface extension" +archive(byte) = "eventchn.cma" +archive(native) = "eventchn.cmxa"
tools/ocaml/libs/eventchn/Makefile new file +28 -0
@@ -0,0 +1,28 @@ +TOPLEVEL=../.. +include $(TOPLEVEL)/common.make + +OBJS = eventchn +INTF = $(foreach obj, $(OBJS),$(obj).cmi) +LIBS = eventchn.cma eventchn.cmxa + +all: $(INTF) $(LIBS) $(PROGRAMS) + +bins: $(PROGRAMS) + +libs: $(LIBS) + +eventchn_OBJS = $(OBJS) +eventchn_C_OBJS = eventchn_stubs + +OCAML_LIBRARY = eventchn + +.PHONY: install +install: $(LIBS) META + ocamlfind install -destdir $(DESTDIR)$(shell ocamlfind printconf destdir) -ldconf ignore eventchn META $(INTF) $(LIBS) *.a *.so *.cmx + +.PHONY: uninstall +uninstall: + ocamlfind remove eventchn + +include $(TOPLEVEL)/Makefile.rules +
tools/ocaml/libs/eventchn/eventchn.ml new file +27 -0
@@ -0,0 +1,27 @@ +(* + * Copyright (C) 2006-2007 XenSource Ltd. + * Copyright (C) 2008 Citrix Ltd. + * Author Vincent Hanquez <[email protected]> + * + * 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. + *) + +exception Error of string + +external init: unit -> Unix.file_descr = "stub_eventchn_init" +external notify: Unix.file_descr -> int -> unit = "stub_eventchn_notify" +external bind_interdomain: Unix.file_descr -> int -> int -> int = "stub_eventchn_bind_interdomain" +external bind_virq: Unix.file_descr -> int = "stub_eventchn_bind_virq" +external unbind: Unix.file_descr -> int -> unit = "stub_eventchn_unbind" +external read_port: Unix.file_descr -> int = "stub_eventchn_read_port" +external write_port: Unix.file_descr -> int -> unit = "stub_eventchn_write_port" + +let _ = Callback.register_exception "eventchn.error" (Error "register_callback")
tools/ocaml/libs/eventchn/eventchn.mli new file +26 -0
@@ -0,0 +1,26 @@ +(* + * Copyright (C) 2006-2007 XenSource Ltd. + * Copyright (C) 2008 Citrix Ltd. + * Author Vincent Hanquez <[email protected]> + * + * 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. + *) + +exception Error of string +external init : unit -> Unix.file_descr = "stub_eventchn_init" +external notify : Unix.file_descr -> int -> unit = "stub_eventchn_notify" +external bind_interdomain : Unix.file_descr -> int -> int -> int + = "stub_eventchn_bind_interdomain" +external bind_virq : Unix.file_descr -> int = "stub_eventchn_bind_virq" +external unbind : Unix.file_descr -> int -> unit = "stub_eventchn_unbind" +external read_port : Unix.file_descr -> int = "stub_eventchn_read_port" +external write_port : Unix.file_descr -> int -> unit + = "stub_eventchn_write_port"
tools/ocaml/libs/eventchn/eventchn_stubs.c new file +173 -0
173 lines not on this page · raw message
tools/ocaml/libs/log/META.in new file +4 -0
@@ -0,0 +1,4 @@ +version = "@VERSION@" +description = "Log - logging library" +archive(byte) = "log.cma" +archive(native) = "log.cmxa"
tools/ocaml/libs/log/Makefile new file +43 -0
43 lines not on this page · raw message
tools/ocaml/libs/log/log.ml new file +258 -0
258 lines not on this page · raw message
tools/ocaml/libs/log/log.mli new file +55 -0
55 lines not on this page · raw message
tools/ocaml/libs/log/logs.ml new file +197 -0
197 lines not on this page · raw message
tools/ocaml/libs/log/logs.mli new file +46 -0
46 lines not on this page · raw message
tools/ocaml/libs/log/syslog.ml new file +26 -0
@@ -0,0 +1,26 @@ +(* + * Copyright (C) 2006-2007 XenSource Ltd. + * Copyright (C) 2008 Citrix Ltd. + * Author Vincent Hanquez <[email protected]> + * + * 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. + *) + +type level = Emerg | Alert | Crit | Err | Warning | Notice | Info | Debug +type options = Cons | Ndelay | Nowait | Odelay | Perror | Pid +type facility = Auth | Authpriv | Cron | Daemon | Ftp | Kern + | Local0 | Local1 | Local2 | Local3 + | Local4 | Local5 | Local6 | Local7 + | Lpr | Mail | News | Syslog | User | Uucp + +(* external init : string -> options list -> facility -> unit = "stub_openlog" *) +external log : facility -> level -> string -> unit = "stub_syslog" +external close : unit -> unit = "stub_closelog"
tools/ocaml/libs/log/syslog.mli new file +41 -0
41 lines not on this page · raw message
tools/ocaml/libs/log/syslog_stubs.c new file +73 -0
73 lines not on this page · raw message
tools/ocaml/libs/mmap/META.in new file +4 -0
@@ -0,0 +1,4 @@ +version = "@VERSION@" +description = "Mmap interface extension" +archive(byte) = "mmap.cma" +archive(native) = "mmap.cmxa"
tools/ocaml/libs/mmap/Makefile new file +27 -0
@@ -0,0 +1,27 @@ +TOPLEVEL=../.. +include $(TOPLEVEL)/common.make + +OBJS = mmap +INTF = $(foreach obj, $(OBJS),$(obj).cmi) +LIBS = mmap.cma mmap.cmxa + +all: $(INTF) $(LIBS) $(PROGRAMS) + +bins: $(PROGRAMS) + +libs: $(LIBS) + +mmap_OBJS = $(OBJS) +mmap_C_OBJS = mmap_stubs +OCAML_LIBRARY = mmap + +.PHONY: install +install: $(LIBS) META + ocamlfind install -destdir $(DESTDIR)$(shell ocamlfind printconf destdir) -ldconf ignore mmap META $(INTF) $(LIBS) *.a *.so *.cmx + +.PHONY: uninstall +uninstall: + ocamlfind remove mmap + +include $(TOPLEVEL)/Makefile.rules +
tools/ocaml/libs/mmap/mmap.ml new file +31 -0
@@ -0,0 +1,31 @@ +(* + * Copyright (C) 2006-2007 XenSource Ltd. + * Copyright (C) 2008 Citrix Ltd. + * Author Vincent Hanquez <[email protected]> + * + * 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. + *) + +type mmap_interface + +type mmap_prot_flag = RDONLY | WRONLY | RDWR +type mmap_map_flag = SHARED | PRIVATE + +(* mmap: fd -> prot_flag -> map_flag -> length -> offset -> interface *) +external mmap: Unix.file_descr -> mmap_prot_flag -> mmap_map_flag + -> int -> int -> mmap_interface = "stub_mmap_init" +external unmap: mmap_interface -> unit = "stub_mmap_final" +(* read: interface -> start -> length -> data *) +external read: mmap_interface -> int -> int -> string = "stub_mmap_read" +(* write: interface -> data -> start -> length -> unit *) +external write: mmap_interface -> string -> int -> int -> unit = "stub_mmap_write" +(* getpagesize: unit -> size of page *) +external getpagesize: unit -> int = "stub_mmap_getpagesize"
tools/ocaml/libs/mmap/mmap.mli new file +28 -0
@@ -0,0 +1,28 @@ +(* + * Copyright (C) 2006-2007 XenSource Ltd. + * Copyright (C) 2008 Citrix Ltd. + * Author Vincent Hanquez <[email protected]> + * + * 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. + *) + +type mmap_interface +type mmap_prot_flag = RDONLY | WRONLY | RDWR +type mmap_map_flag = SHARED | PRIVATE + +external mmap : Unix.file_descr -> mmap_prot_flag -> mmap_map_flag -> int -> int + -> mmap_interface = "stub_mmap_init" +external unmap : mmap_interface -> unit = "stub_mmap_final" +external read : mmap_interface -> int -> int -> string = "stub_mmap_read" +external write : mmap_interface -> string -> int -> int -> unit + = "stub_mmap_write" + +external getpagesize : unit -> int = "stub_mmap_getpagesize"
tools/ocaml/libs/mmap/mmap_stubs.c new file +136 -0
136 lines not on this page · raw message
tools/ocaml/libs/mmap/mmap_stubs.h new file +33 -0
@@ -0,0 +1,33 @@ +/* +* Copyright (C) 2006-2007 XenSource Ltd. +* Copyright (C) 2008 Citrix Ltd. +* Author Vincent Hanquez <[email protected]> +* +* 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. +*/ + +#ifndef C_MMAP_H +#define C_MMAP_H + +#include <caml/mlvalues.h> +#include <caml/memory.h> +#include <caml/alloc.h> +#include <caml/custom.h> +#include <caml/fail.h> +#include <caml/callback.h> + +struct mmap_interface +{ +void *addr; +int len; +}; + +#endif
tools/ocaml/libs/stdext/META.in new file +5 -0
@@ -0,0 +1,5 @@ +version = "@VERSION@" +description = "Stdext - Common stdlib extensions" +requires = "unix,uuid" +archive(byte) = "stdext.cma" +archive(native) = "stdext.cmxa"
tools/ocaml/libs/stdext/Makefile new file +43 -0
43 lines not on this page · raw message
tools/ocaml/libs/stdext/bigbuffer.ml new file +90 -0
90 lines not on this page · raw message
tools/ocaml/libs/stdext/bigbuffer.mli new file +22 -0
@@ -0,0 +1,22 @@ +(* + * Copyright (C) 2006-2007 XenSource Ltd. + * Copyright (C) 2008 Citrix Ltd. + * Author Vincent Hanquez <[email protected]> + * + * 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. + *) +type t +val make : unit -> t +val length : t -> int64 +val append_substring : t -> string -> int -> int -> unit +val to_fct : t -> (string -> unit) -> unit +val to_string : t -> string +val to_stream : t -> out_channel -> unit
tools/ocaml/libs/stdext/eventloop.ml new file +357 -0
357 lines not on this page · raw message
tools/ocaml/libs/stdext/eventloop.mli new file +100 -0
100 lines not on this page · raw message
tools/ocaml/libs/stdext/file.ml new file +34 -0
@@ -0,0 +1,34 @@ +(* + * Copyright (C) 2006-2007 XenSource Ltd. + * Copyright (C) 2008 Citrix Ltd. + * Author Vincent Hanquez <[email protected]> + * Author Dave Scott <[email protected]> + * + * 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 write_string file mode s = + let fn_write_string fd = Unixext.really_write fd s 0 (String.length s) in + Unixext.with_file file (Unix.O_WRONLY :: mode) 0o640 fn_write_string + +let write_fn file mode fn = + let fn_write_fn fd = + let quit = ref false in + while not !quit + do + let s = fn () in + if s = "" then + quit := true + else + Unixext.really_write fd s 0 (String.length s) + done + in + Unixext.with_file file (Unix.O_WRONLY :: mode) 0o640 fn_write_fn
tools/ocaml/libs/stdext/file.mli new file +18 -0
@@ -0,0 +1,18 @@ +(* + * Copyright (C) 2006-2007 XenSource Ltd. + * Copyright (C) 2008 Citrix Ltd. + * Author Vincent Hanquez <[email protected]> + * Author Dave Scott <[email protected]> + * + * 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. + *) +val write_string : string -> Unix.open_flag list -> string -> unit +val write_fn : string -> Unix.open_flag list -> (unit -> string) -> unit
tools/ocaml/libs/stdext/filenameext.ml new file +33 -0
@@ -0,0 +1,33 @@ +(* + * Copyright (C) 2006-2007 XenSource Ltd. + * Copyright (C) 2008 Citrix Ltd. + * Author Vincent Hanquez <[email protected]> + * Author Dave Scott <[email protected]> + * + * 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. + *) + +(** Makes a new file in the same directory as 'otherfile' *) +let temp_file_in_dir otherfile = + let base_dir = Filename.dirname otherfile in + let rec keep_trying () = + try + let uuid = Uuid.to_string (Uuid.make_uuid ()) in + let newfile = base_dir ^ "/" ^ uuid in + Unix.close (Unix.openfile newfile [Unix.O_CREAT; Unix.O_TRUNC; Unix.O_EXCL] 0o600); + newfile + with + Unix.Unix_error (Unix.EEXIST, _, _) -> keep_trying () + in + keep_trying () + + +
tools/ocaml/libs/stdext/filenameext.mli new file +17 -0
@@ -0,0 +1,17 @@ +(* + * Copyright (C) 2006-2007 XenSource Ltd. + * Copyright (C) 2008 Citrix Ltd. + * Author Vincent Hanquez <[email protected]> + * Author Dave Scott <[email protected]> + * + * 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. + *) +val temp_file_in_dir : string -> string
tools/ocaml/libs/stdext/hashtblext.ml new file +38 -0
@@ -0,0 +1,38 @@ +(* + * Copyright (C) 2006-2007 XenSource Ltd. + * Copyright (C) 2008 Citrix Ltd. + * Author Vincent Hanquez <[email protected]> + * + * 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. + *) +module Hashtbl = struct include Hashtbl + +let to_list tbl = + Hashtbl.fold (fun k v acc -> (k, v) :: acc) tbl [] + +let fold_keys tbl = + Hashtbl.fold (fun k v acc -> k :: acc) tbl [] + +let fold_values tbl = + Hashtbl.fold (fun k v acc -> v :: acc) tbl [] + +let add_empty tbl k v = + if not (Hashtbl.mem tbl k) then + Hashtbl.add tbl k v + +let add_list tbl l = + List.iter (fun (k, v) -> Hashtbl.add tbl k v) l + +let of_list l = + let tbl = Hashtbl.create (List.length l) in + add_list tbl l; + tbl +end
tools/ocaml/libs/stdext/hashtblext.mli new file +77 -0
77 lines not on this page · raw message
tools/ocaml/libs/stdext/listext.ml new file +27 -0
@@ -0,0 +1,27 @@ +(* + * Copyright (C) 2006-2007 XenSource Ltd. + * Copyright (C) 2008 Citrix Ltd. + * Author Vincent Hanquez <[email protected]> + * Author Dave Scott <[email protected]> + * + * 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. + *) +module List = struct include List + +let iteri f l = + let i = ref 0 in + List.iter (fun x -> f !i x; incr i) l + +let mapi f l = + let i = ref 0 in + List.map (fun x -> let r = f !i x in incr i; r) l + +end
tools/ocaml/libs/stdext/listext.mli new file +65 -0
65 lines not on this page · raw message
tools/ocaml/libs/stdext/opt.ml new file +48 -0
48 lines not on this page · raw message
tools/ocaml/libs/stdext/opt.mli new file +24 -0
@@ -0,0 +1,24 @@ +(* + * Copyright (C) 2006-2007 XenSource Ltd. + * Copyright (C) 2008 Citrix Ltd. + * Author Vincent Hanquez <[email protected]> + * Author Dave Scott <[email protected]> + * + * 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. + *) +val iter : ('a -> unit) -> 'a option -> unit +val map : ('a -> 'b) -> 'a option -> 'b option +val default : 'a -> 'a option -> 'a +val unbox : 'a option -> 'a +val is_boxed : 'a option -> bool +val to_list : 'a option -> 'a list +val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b option -> 'a +val fold_right : ('a -> 'b -> 'b) -> 'a option -> 'b -> 'b
tools/ocaml/libs/stdext/pervasiveext.ml new file +61 -0
61 lines not on this page · raw message
tools/ocaml/libs/stdext/pervasiveext.mli new file +30 -0
@@ -0,0 +1,30 @@ +(* + * Copyright (C) 2006-2007 XenSource Ltd. + * Copyright (C) 2008 Citrix Ltd. + * Author Vincent Hanquez <[email protected]> + * Author Dave Scott <[email protected]> + * + * 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. + *) +type ('a, 'b) either = Right of 'a | Left of 'b +val exnhook : (exn -> unit) option ref +val finally : (unit -> 'a) -> (unit -> 'b) -> 'a +val may : ('a -> 'b) -> 'a option -> 'b option +val default : 'a -> 'a option -> 'a +val maybe : ('a -> unit) -> 'a option -> unit +val reraise_if : bool -> (unit -> unit) -> unit +val ignore_exn : (unit -> unit) -> unit +val ignore_int : int -> unit +val ignore_int32 : int32 -> unit +val ignore_int64 : int64 -> unit +val ignore_string : string -> unit +val ignore_float : float -> unit +val ignore_bool : bool -> unit
tools/ocaml/libs/stdext/qring.ml new file +161 -0
161 lines not on this page · raw message
tools/ocaml/libs/stdext/qring.mli new file +47 -0
47 lines not on this page · raw message
tools/ocaml/libs/stdext/ring.ml new file +109 -0
109 lines not on this page · raw message
tools/ocaml/libs/stdext/ring.mli new file +30 -0
@@ -0,0 +1,30 @@ +(* + * Copyright (C) 2006-2007 XenSource Ltd. + * Copyright (C) 2008 Citrix Ltd. + * Author Vincent Hanquez <[email protected]> + * Author Dave Scott <[email protected]> + * + * 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. + *) +type 'a t = { size : int; mutable current : int; data : 'a array; } +val make : int -> 'a -> 'a t +val length : 'a t -> int +val push : 'a t -> 'a -> unit +val peek : 'a t -> int -> 'a +val top : 'a t -> 'a +val iter_nb : 'a t -> ('a -> 'b) -> int -> unit +val raw_iter : 'a t -> ('a -> unit) -> unit +val iter : 'a t -> ('a -> 'b) -> unit +val get_nb : 'a t -> int -> 'a array +val get_nb_lst : 'a t -> int -> 'a list +val get : 'a t -> 'a array +val get_nb_rev : 'a t -> int -> 'a array +val get_nb_rev_lst : 'a t -> int -> 'a list
tools/ocaml/libs/stdext/stringext.ml new file +206 -0
206 lines not on this page · raw message
tools/ocaml/libs/stdext/stringext.mli new file +108 -0
98 lines not on this page · raw message
tools/ocaml/libs/stdext/threadext.ml new file +212 -0
212 lines not on this page · raw message
tools/ocaml/libs/stdext/threadext.mli new file +67 -0
67 lines not on this page · raw message
tools/ocaml/libs/stdext/trie.ml new file +182 -0
182 lines not on this page · raw message
tools/ocaml/libs/stdext/trie.mli new file +60 -0
60 lines not on this page · raw message
tools/ocaml/libs/stdext/unixext.ml new file +437 -0
437 lines not on this page · raw message
tools/ocaml/libs/stdext/unixext.mli new file +84 -0
84 lines not on this page · raw message
tools/ocaml/libs/stdext/unixext_stubs.c new file +304 -0
304 lines not on this page · raw message
tools/ocaml/libs/stdext/vIO.ml new file +250 -0
250 lines not on this page · raw message
tools/ocaml/libs/stdext/vIO.mli new file +51 -0
51 lines not on this page · raw message
tools/ocaml/libs/stdext/varmap.ml new file +26 -0
Lines of this file are not shown. View the raw message.
tools/ocaml/libs/stdext/varmap.mli new file +22 -0
Lines of this file are not shown. View the raw message.
tools/ocaml/libs/uuid/Makefile new file +26 -0
Lines of this file are not shown. View the raw message.
tools/ocaml/libs/uuid/uuid.ml new file +88 -0
88 lines not on this page · raw message
tools/ocaml/libs/uuid/uuid.mli new file +53 -0
53 lines not on this page · raw message
tools/ocaml/libs/xb/Makefile new file +41 -0
41 lines not on this page · raw message
tools/ocaml/libs/xb/op.ml new file +84 -0
84 lines not on this page · raw message
tools/ocaml/libs/xb/packet.ml new file +50 -0
50 lines not on this page · raw message
tools/ocaml/libs/xb/partial.ml new file +44 -0
44 lines not on this page · raw message
tools/ocaml/libs/xb/xb.ml new file +189 -0
189 lines not on this page · raw message
tools/ocaml/libs/xb/xb.mli new file +83 -0
83 lines not on this page · raw message
tools/ocaml/libs/xb/xb_stubs.c new file +74 -0
74 lines not on this page · raw message
tools/ocaml/libs/xb/xs_ring.ml new file +18 -0
Lines of this file are not shown. View the raw message.
tools/ocaml/libs/xb/xs_ring_stubs.c new file +117 -0
117 lines not on this page · raw message
tools/ocaml/libs/xc/xc.h new file +191 -0
191 lines not on this page · raw message
tools/ocaml/libs/xc/xc.ml new file +340 -0
340 lines not on this page · raw message
tools/ocaml/libs/xc/xc.mli new file +196 -0
196 lines not on this page · raw message
tools/ocaml/libs/xc/xc_cpufeature.h new file +116 -0
116 lines not on this page · raw message
tools/ocaml/libs/xc/xc_cpuid.h new file +285 -0
285 lines not on this page · raw message
tools/ocaml/libs/xc/xc_e820.h new file +20 -0
Lines of this file are not shown. View the raw message.
tools/ocaml/libs/xc/xc_lib.c new file +1502 -0
1,502 lines not on this page · raw message
tools/ocaml/libs/xc/xc_stubs.c new file +1170 -0
1,170 lines not on this page · raw message
tools/ocaml/libs/xs/Makefile new file +42 -0
42 lines not on this page · raw message
tools/ocaml/libs/xs/queueop.ml new file +73 -0
73 lines not on this page · raw message
tools/ocaml/libs/xs/xs.ml new file +170 -0
170 lines not on this page · raw message
tools/ocaml/libs/xs/xs.mli new file +90 -0
90 lines not on this page · raw message
tools/ocaml/libs/xs/xsraw.ml new file +265 -0
265 lines not on this page · raw message
tools/ocaml/libs/xs/xsraw.mli new file +60 -0
60 lines not on this page · raw message
tools/ocaml/libs/xs/xst.ml new file +61 -0
61 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Part of the diff is not shown here. View the raw message.
PATCH 2/6 add ocaml xenstored
In reply to Vincent Hanquez--- tools/ocaml/xenstored/Makefile | 54 ++++ tools/ocaml/xenstored/config.ml | 112 ++++++++ tools/ocaml/xenstored/connection.ml | 234 +++++++++++++++++ tools/ocaml/xenstored/connections.ml | 167 ++++++++++++ tools/ocaml/xenstored/define.ml | 40 +++ tools/ocaml/xenstored/disk.ml | 157 ++++++++++++ tools/ocaml/xenstored/domain.ml | 62 +++++ tools/ocaml/xenstored/domains.ml | 84 ++++++ tools/ocaml/xenstored/event.ml | 29 +++ tools/ocaml/xenstored/logging.ml | 238 ++++++++++++++++++ tools/ocaml/xenstored/parse_arg.ml | 68 +++++ tools/ocaml/xenstored/perms.ml | 165 ++++++++++++ tools/ocaml/xenstored/process.ml | 395 +++++++++++++++++++++++++++++ tools/ocaml/xenstored/quota.ml | 83 ++++++ tools/ocaml/xenstored/store.ml | 460 ++++++++++++++++++++++++++++++++++ tools/ocaml/xenstored/symbol.ml | 76 ++++++ tools/ocaml/xenstored/symbol.mli | 52 ++++ tools/ocaml/xenstored/transaction.ml | 197 +++++++++++++++ tools/ocaml/xenstored/utils.ml | 107 ++++++++ tools/ocaml/xenstored/xenstored.conf | 30 +++ tools/ocaml/xenstored/xenstored.ml | 404 +++++++++++++++++++++++++++++ 21 files changed, 3214 insertions(+), 0 deletions(-) create mode 100644 tools/ocaml/xenstored/Makefile create mode 100644 tools/ocaml/xenstored/config.ml create mode 100644 tools/ocaml/xenstored/connection.ml create mode 100644 tools/ocaml/xenstored/connections.ml create mode 100644 tools/ocaml/xenstored/define.ml create mode 100644 tools/ocaml/xenstored/disk.ml create mode 100644 tools/ocaml/xenstored/domain.ml create mode 100644 tools/ocaml/xenstored/domains.ml create mode 100644 tools/ocaml/xenstored/event.ml create mode 100644 tools/ocaml/xenstored/logging.ml create mode 100644 tools/ocaml/xenstored/parse_arg.ml create mode 100644 tools/ocaml/xenstored/perms.ml create mode 100644 tools/ocaml/xenstored/process.ml create mode 100644 tools/ocaml/xenstored/quota.ml create mode 100644 tools/ocaml/xenstored/store.ml create mode 100644 tools/ocaml/xenstored/symbol.ml create mode 100644 tools/ocaml/xenstored/symbol.mli create mode 100644 tools/ocaml/xenstored/transaction.ml create mode 100644 tools/ocaml/xenstored/utils.ml create mode 100644 tools/ocaml/xenstored/xenstored.conf create mode 100644 tools/ocaml/xenstored/xenstored.ml
tools/ocaml/xenstored/Makefile new file +54 -0
@@ -0,0 +1,54 @@ +OCAML_TOPLEVEL = .. +include $(OCAML_TOPLEVEL)/common.make + +OCAMLINCLUDE += \ + -I $(OCAML_TOPLEVEL)/libs/log \ + -I $(OCAML_TOPLEVEL)/libs/xb \ + -I $(OCAML_TOPLEVEL)/libs/uuid \ + -I $(OCAML_TOPLEVEL)/libs/mmap \ + -I $(OCAML_TOPLEVEL)/libs/xc \ + -I $(OCAML_TOPLEVEL)/libs/eventchn \ + -I $(OCAML_TOPLEVEL)/libs/stdext + +OBJS = define \ + config \ + logging \ + quota \ + perms \ + symbol \ + utils \ + store \ + disk \ + transaction \ + event \ + domain \ + domains \ + connection \ + connections \ + parse_arg \ + process \ + xenstored + +INTF = symbol.cmi +XENSTOREDLIBS = \ + unix.cmxa \ + $(OCAML_TOPLEVEL)/libs/uuid/uuid.cmxa \ + -ccopt -L -ccopt $(OCAML_TOPLEVEL)/libs/mmap $(OCAML_TOPLEVEL)/libs/mmap/mmap.cmxa \ + -ccopt -L -ccopt $(OCAML_TOPLEVEL)/libs/log $(OCAML_TOPLEVEL)/libs/log/log.cmxa \ + -ccopt -L -ccopt $(OCAML_TOPLEVEL)/libs/eventchn $(OCAML_TOPLEVEL)/libs/eventchn/eventchn.cmxa \ + -ccopt -L -ccopt $(OCAML_TOPLEVEL)/libs/xc $(OCAML_TOPLEVEL)/libs/xc/xc.cmxa \ + -ccopt -L -ccopt $(OCAML_TOPLEVEL)/libs/xb $(OCAML_TOPLEVEL)/libs/xb/xb.cmxa \ + -ccopt -L -ccopt $(OCAML_TOPLEVEL)/libs/stdext $(OCAML_TOPLEVEL)/libs/stdext/stdext.cmxa + +PROGRAMS = oxenstored + +oxenstored_LIBS = $(XENSTOREDLIBS) +oxenstored_OBJS = $(OBJS) + +OCAML_PROGRAM = oxenstored + +all: $(INTF) $(PROGRAMS) + +bins: $(PROGRAMS) + +include $(OCAML_TOPLEVEL)/Makefile.rules
tools/ocaml/xenstored/config.ml new file +112 -0
112 lines not on this page · raw message
tools/ocaml/xenstored/connection.ml new file +234 -0
234 lines not on this page · raw message
tools/ocaml/xenstored/connections.ml new file +167 -0
167 lines not on this page · raw message
tools/ocaml/xenstored/define.ml new file +40 -0
@@ -0,0 +1,40 @@ +(* + * Copyright (C) 2006-2007 XenSource Ltd. + * Copyright (C) 2008 Citrix Ltd. + * Author Vincent Hanquez <[email protected]> + * + * 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 xenstored_major = 1 +let xenstored_minor = 0 + +let xenstored_proc_kva = "/proc/xen/xsd_kva" +let xenstored_proc_port = "/proc/xen/xsd_port" + +let xs_daemon_socket = "/var/run/xenstored/socket" +let xs_daemon_socket_ro = "/var/run/xenstored/socket_ro" + +let default_config_dir = "/etc/xensource" + +let maxwatch = ref (50) +let maxtransaction = ref (20) + +let domid_self = 0x7FF0 + +exception Not_a_directory of string +exception Not_a_value of string +exception Already_exist +exception Doesnt_exist +exception Lookup_Doesnt_exist of string +exception Invalid_path +exception Permission_denied +exception Unknown_operation
tools/ocaml/xenstored/disk.ml new file +157 -0
157 lines not on this page · raw message
tools/ocaml/xenstored/domain.ml new file +62 -0
62 lines not on this page · raw message
tools/ocaml/xenstored/domains.ml new file +84 -0
84 lines not on this page · raw message
tools/ocaml/xenstored/event.ml new file +29 -0
@@ -0,0 +1,29 @@ +(* + * Copyright (C) 2006-2007 XenSource Ltd. + * Copyright (C) 2008 Citrix Ltd. + * Author Vincent Hanquez <[email protected]> + * + * 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. + *) + +(**************** high level binding ****************) +type t = { + fd: Unix.file_descr; + mutable virq_port: int; +} + +let init () = { fd = Eventchn.init (); virq_port = -1; } +let bind_virq eventchn = eventchn.virq_port <- Eventchn.bind_virq eventchn.fd +let bind_interdomain eventchn domid port = Eventchn.bind_interdomain eventchn.fd domid port +let unbind eventchn port = Eventchn.unbind eventchn.fd port +let notify eventchn port = Eventchn.notify eventchn.fd port +let read_port eventchn = Eventchn.read_port eventchn.fd +let write_port eventchn port = Eventchn.write_port eventchn.fd port
tools/ocaml/xenstored/logging.ml new file +238 -0
238 lines not on this page · raw message
tools/ocaml/xenstored/parse_arg.ml new file +68 -0
68 lines not on this page · raw message
tools/ocaml/xenstored/perms.ml new file +165 -0
165 lines not on this page · raw message
tools/ocaml/xenstored/process.ml new file +395 -0
395 lines not on this page · raw message
tools/ocaml/xenstored/quota.ml new file +83 -0
83 lines not on this page · raw message
tools/ocaml/xenstored/store.ml new file +460 -0
460 lines not on this page · raw message
tools/ocaml/xenstored/symbol.ml new file +76 -0
76 lines not on this page · raw message
tools/ocaml/xenstored/symbol.mli new file +52 -0
52 lines not on this page · raw message
tools/ocaml/xenstored/transaction.ml new file +197 -0
197 lines not on this page · raw message
tools/ocaml/xenstored/utils.ml new file +107 -0
107 lines not on this page · raw message
tools/ocaml/xenstored/xenstored.conf new file +30 -0
@@ -0,0 +1,30 @@ +# default xenstored config + +# Where the pid file is stored +pid-file = /var/run/xensource/xenstored.pid + +# Randomly failed a transaction with EAGAIN. Used for testing Xs user +test-eagain = true + +# Activate transaction merge support +merge-activate = true + +# Activate node permission system +perms-activate = true + +# Activate quota +quota-activate = true +quota-maxentity = 1000 +quota-maxsize = 2048 +quota-maxwatch = 100 +quota-transaction = 10 + +# Activate filed base backend +persistant = false + +# Logs +log = error;general;file:/var/log/xenstored.log +log = warn;general;file:/var/log/xenstored.log +log = info;general;file:/var/log/xenstored.log + +# log = debug;io;file:/var/log/xenstored-io.log
tools/ocaml/xenstored/xenstored.ml new file +404 -0
190 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Part of the diff is not shown here. View the raw message.
PATCH 3/6 add compilation makefile to ocaml directory
In reply to Vincent Hanquez--- tools/ocaml/Makefile | 36 +++++++++++++++++ tools/ocaml/Makefile.rules | 93 ++++++++++++++++++++++++++++++++++++++++++++ tools/ocaml/common.make | 28 +++++++++++++ 3 files changed, 157 insertions(+), 0 deletions(-) create mode 100644 tools/ocaml/Makefile create mode 100644 tools/ocaml/Makefile.rules create mode 100644 tools/ocaml/common.make
tools/ocaml/Makefile new file +36 -0
@@ -0,0 +1,36 @@ +XEN_ROOT = ../.. +include $(XEN_ROOT)/tools/Rules.mk + +SUBDIRS_LIBS = \ + libs/uuid libs/stdext libs/mmap \ + libs/log libs/xc libs/eventchn \ + libs/xb libs/xs + +SUBDIRS_PROGRAMS = xenstored + +SUBDIRS = $(SUBDIRS_LIBS) $(SUBDIRS_PROGRAMS) + +.PHONY: all +all: build + +.PHONY: build $(SUBDIRS) +build: $(SUBDIRS) + +$(SUBDIRS): + @echo " === building $@" + @$(MAKE) --no-print-directory -C $@ + +.PHONY: install install-libs install-program +install: install-libs install-program + +install-program: $(SUBDIRS_PROGRAMS) + $(INSTALL_DIR) $(DESTDIR)$(SBINDIR) + $(INSTALL_PROG) xenstored/oxenstored $(DESTDIR)$(SBINDIR) + +install-libs: $(SUBDIRS_LIBS) + +.PHONY: clean +clean: + @for dir in $(SUBDIRS); do \ + $(MAKE) --no-print-directory -C $$dir clean; \ + done
tools/ocaml/Makefile.rules new file +93 -0
93 lines not on this page · raw message
tools/ocaml/common.make new file +28 -0
@@ -0,0 +1,28 @@ +CC ?= gcc +OCAMLOPT ?= ocamlopt +OCAMLC ?= ocamlc +OCAMLMKLIB ?= ocamlmklib +OCAMLDEP ?= ocamldep +OCAMLLEX ?= ocamllex +OCAMLYACC ?= ocamlyacc + +CFLAGS ?= -Wall -fPIC -O2 + +XEN_ROOT ?= $(TOPLEVEL)/../xen-unstable.hg +XEN_DIST_ROOT ?= $(XEN_ROOT)/dist/install +CFLAGS += -I$(XEN_DIST_ROOT)/usr/include + +OCAMLOPTFLAG_G := $(shell $(OCAMLOPT) -h 2>&1 | sed -n 's/^ *\(-g\) .*/\1/p') +OCAMLOPTFLAGS = $(OCAMLOPTFLAG_G) -ccopt "$(LDFLAGS)" -dtypes $(OCAMLINCLUDE) -cc $(CC) -w F -warn-error F +OCAMLCFLAGS += -g $(OCAMLINCLUDE) -w F -warn-error F + +#LDFLAGS = -cclib -L./ + +DESTDIR ?= / +VERSION := echo 0.0 + +OCAMLABI = $(shell $(OCAMLC) -version) +OCAMLLIBDIR = $(shell $(OCAMLC) -where) +OCAMLDESTDIR ?= $(OCAMLLIBDIR) + +o= >[email protected] && mv -f [email protected] $@
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
PATCH 4/6 remove hook from external ocaml repository
In reply to Vincent Hanquez--- Config.mk | 6 ------ tools/Makefile | 21 --------------------- tools/xenstore/Makefile | 5 ----- 3 files changed, 0 insertions(+), 32 deletions(-)
Config.mk +0 -6
@@ -154,12 +154,6 @@ QEMU_TAG ?= e5d14857cd67490bf956d97c8888c0be95ed3f78 # Thu Feb 18 15:36:29 2010 +0000 # When xen_platform_pci=0 also disable fixed Xen platform ioports -OCAML_XENSTORED_REPO=http://xenbits.xensource.com/ext/xen-ocaml-tools.hg - -# Build OCAML version of xenstored instead of the in-tree C version? -# This will cause $(OCAML_XENSTORED_REPO) to be cloned. -CONFIG_OCAML_XENSTORED ?= n - # Optional components XENSTAT_XENTOP ?= y VTPM_TOOLS ?= n
tools/Makefile +0 -21
@@ -6,7 +6,6 @@ SUBDIRS-y += check SUBDIRS-y += include SUBDIRS-y += libxc SUBDIRS-y += flask -SUBDIRS-$(CONFIG_OCAML_XENSTORED) += ocaml-xenstored SUBDIRS-y += xenstore SUBDIRS-y += misc SUBDIRS-y += examples
@@ -114,23 +113,3 @@ subdir-clean-ioemu-dir: $(buildmakevars2shellvars); \ $(MAKE) -C ioemu-dir clean; \ fi - -ocaml-xenstored: - set -ex; \ - rm -rf ocaml-xenstored.tmp; \ - hg clone $(OCAML_XENSTORED_REPO) ocaml-xenstored.tmp; \ - if [ "$(OCAML_XENSTORED_TAG)" ]; then \ - hg -R ocaml-xenstored.tmp update -r $(OCAML_XENSTORED_TAG) ;\ - hg -R ocaml-xenstored.tmp branch mybranch ;\ - fi; \ - mv ocaml-xenstored.tmp ocaml-xenstored; \ - -subdir-all-ocaml-xenstored subdir-install-ocaml-xenstored: ocaml-xenstored - $(absolutify_xen_root); \ - $(MAKE) -C ocaml-xenstored $(patsubst subdir-%-ocaml-xenstored,%,$@); - -subdir-clean-ocaml-xenstored: - set -e; if test -d ocaml-xenstored; then \ - $(MAKE) -C ocaml-xenstored clean; \ - fi -
tools/xenstore/Makefile +0 -5
@@ -95,11 +95,6 @@ tarball: clean .PHONY: install install: all -ifneq ($(CONFIG_OCAML_XENSTORED),y) - $(INSTALL_DIR) $(DESTDIR)/var/run/xenstored - $(INSTALL_DIR) $(DESTDIR)/var/lib/xenstored - $(INSTALL_PROG) xenstored $(DESTDIR)$(SBINDIR) -endif $(INSTALL_DIR) $(DESTDIR)$(BINDIR) $(INSTALL_DIR) $(DESTDIR)$(SBINDIR) $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
PATCH 5/6 add ocaml tools to build if defined. default to n
In reply to Vincent Hanquez--- Config.mk | 1 + tools/Makefile | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-)
Config.mk +1 -0
@@ -159,6 +159,7 @@ XENSTAT_XENTOP ?= y VTPM_TOOLS ?= n LIBXENAPI_BINDINGS ?= n PYTHON_TOOLS ?= y +OCAML_TOOLS ?= n CONFIG_MINITERM ?= n CONFIG_LOMOUNT ?= n
tools/Makefile +2 -0
@@ -40,6 +40,8 @@ SUBDIRS-$(CONFIG_X86) += xenpaging ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH)) SUBDIRS-$(PYTHON_TOOLS) += python SUBDIRS-$(PYTHON_TOOLS) += pygrub + +SUBDIRS-$(OCAML_TOOLS) += ocaml endif # For the sake of linking, set the sys-root
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
PATCH 6/6 default ocaml tools config variable to y
In reply to Vincent Hanquezfallback mechanism if ocamlopt is not available or if we don't compile on a linux system (probably need portability fixes for solaris/netbsd/etc).
--- Config.mk | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-)
Config.mk +9 -1
@@ -159,8 +159,16 @@ XENSTAT_XENTOP ?= y VTPM_TOOLS ?= n LIBXENAPI_BINDINGS ?= n PYTHON_TOOLS ?= y -OCAML_TOOLS ?= n +OCAML_TOOLS ?= y CONFIG_MINITERM ?= n CONFIG_LOMOUNT ?= n +ifeq ($(OCAML_TOOLS),y) +ifeq ($(CONFIG_Linux),y) +OCAML_TOOLS := $(shell ocamlopt -v > /dev/null 2>&1 && echo "y" || echo "n") +else +OCAML_TOOLS := n +endif +endif + -include $(XEN_ROOT)/.config
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel