[Libguestfs] [PATCH] mllib: Use Unix.F_OK instead of plain F_OK.

Richard W.M. Jones rjones at redhat.com
Tue Jun 14 17:55:20 UTC 2016


Removes this warning:

  File "common_utils.ml", line 826, characters 24-28:
  Warning 40: F_OK was selected from type Unix.access_permission.
  It is not visible in the current scope, and will not
  be selected if the type becomes unknown.
---
 mllib/common_utils.ml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index 8e9f943..64bf3d3 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -823,7 +823,7 @@ let is_partition dev =
       let major = Dev_t.major rdev in
       let minor = Dev_t.minor rdev in
       let path = sprintf "/sys/dev/block/%d:%d/partition" major minor in
-      Unix.access path [F_OK];
+      Unix.access path [Unix.F_OK];
       true
     )
   with Unix.Unix_error _ -> false
-- 
2.7.4




More information about the Libguestfs mailing list