summaryrefslogtreecommitdiff
path: root/sysutils/xentools415/patches/patch-tools_ocaml_xenstored_utils.ml
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/xentools415/patches/patch-tools_ocaml_xenstored_utils.ml')
-rw-r--r--sysutils/xentools415/patches/patch-tools_ocaml_xenstored_utils.ml13
1 files changed, 13 insertions, 0 deletions
diff --git a/sysutils/xentools415/patches/patch-tools_ocaml_xenstored_utils.ml b/sysutils/xentools415/patches/patch-tools_ocaml_xenstored_utils.ml
new file mode 100644
index 00000000000..ffd4a228575
--- /dev/null
+++ b/sysutils/xentools415/patches/patch-tools_ocaml_xenstored_utils.ml
@@ -0,0 +1,13 @@
+$NetBSD: patch-tools_ocaml_xenstored_utils.ml,v 1.1 2021/04/18 12:31:26 bouyer Exp $
+
+--- tools/ocaml/xenstored/utils.ml.orig 2021-01-10 18:02:05.000000000 +0100
++++ tools/ocaml/xenstored/utils.ml 2021-01-10 20:20:53.433611357 +0100
+@@ -86,7 +86,7 @@
+ let buf = Bytes.make 20 '\000' in
+ let sz = Unix.read fd buf 0 20 in
+ Unix.close fd;
+- int_of_string (Bytes.sub_string buf 0 sz)
++ int_of_string (String.trim (Bytes.sub_string buf 0 sz))
+
+ (* @path may be guest data and needs its length validating. @connection_path
+ * is generated locally in xenstored and always of the form "/local/domain/$N/" *)