Displaying 3 results from an estimated 3 matches for "7c42fc5d7".
2017 Nov 07
0
[PATCH] common/mlstdutils: Add with_openfile function.
...LY; O_CLOEXEC] 0 in
- close fd;
- true
+ with_openfile ("/dev/" ^ dev) [O_RDONLY; O_CLOEXEC] 0
+ (fun _ -> true)
with _ -> false
) devs in
diff --git a/daemon/inspect_fs_windows.ml b/daemon/inspect_fs_windows.ml
index 7c42fc5d7..d4d045973 100644
--- a/daemon/inspect_fs_windows.ml
+++ b/daemon/inspect_fs_windows.ml
@@ -429,16 +429,15 @@ and extract_guid_from_registry_blob blob =
(data4 &^ 0xffffffffffff_L)
and pread device size offset =
- let fd = Unix.openfile device [Unix.O_RDONLY; Unix.O_CLOEXEC] 0 in...
2017 Nov 05
0
[PATCH 2/2] common/mlstdutils: Add with_openfile function.
...LY; O_CLOEXEC] 0 in
- close fd;
- true
+ with_openfile ("/dev/" ^ dev) [O_RDONLY; O_CLOEXEC] 0
+ (fun _ -> true)
with _ -> false
) devs in
diff --git a/daemon/inspect_fs_windows.ml b/daemon/inspect_fs_windows.ml
index 7c42fc5d7..112cc2f92 100644
--- a/daemon/inspect_fs_windows.ml
+++ b/daemon/inspect_fs_windows.ml
@@ -429,16 +429,14 @@ and extract_guid_from_registry_blob blob =
(data4 &^ 0xffffffffffff_L)
and pread device size offset =
- let fd = Unix.openfile device [Unix.O_RDONLY; Unix.O_CLOEXEC] 0 in...
2017 Nov 05
3
[PATCH 1/2] common/mlstdutils: Add with_open_in and with_open_out functions.
These safe wrappers around Pervasives.open_in and Pervasives.open_out
ensure that exceptions escaping cannot leave unclosed files.
---
common/mlstdutils/std_utils.ml | 39 ++++++++++++++++++++--------------
common/mlstdutils/std_utils.mli | 12 +++++++++++
common/mltools/tools_utils.ml | 39 +++++++++++++++++-----------------
dib/dib.ml | 9 ++++----