mirror of
https://github.com/gentoo-mirror/guru.git
synced 2025-04-21 07:52:21 -04:00
60 lines
2.3 KiB
Diff
60 lines
2.3 KiB
Diff
From f0b61e87f809dce36fb93e31349d02d9a679253a Mon Sep 17 00:00:00 2001
|
|
From: Hannes Mehnert <hannes@mehnert.org>
|
|
Date: Thu, 27 Jan 2022 16:26:39 +0100
|
|
Subject: [PATCH] adapt to mirage-block 3.0.0 changes
|
|
|
|
---
|
|
lib/ring.ml | 4 ----
|
|
shared-block-ring.opam | 4 ++--
|
|
2 files changed, 2 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/lib/ring.ml b/lib/ring.ml
|
|
index 23db9f1..f1e96ce 100644
|
|
--- a/lib/ring.ml
|
|
+++ b/lib/ring.ml
|
|
@@ -92,14 +92,12 @@ module Common(Log: S.LOG)(B: S.BLOCK) = struct
|
|
m >>= function
|
|
| Error `Is_read_only -> Lwt.return (Error `Is_read_only)
|
|
| Error `Disconnected -> Lwt.return (Error `Disconnected)
|
|
- | Error `Unimplemented -> Lwt.return (Error `Unimplemented)
|
|
| Error x -> Lwt.return (Error x)
|
|
| Ok x -> f x
|
|
let to_msg m =
|
|
let open Lwt.Infix in
|
|
m >>= function
|
|
| Error `Disconnected -> Lwt.return (Error (`Msg "BLOCK device has already disconnected"))
|
|
- | Error `Unimplemented -> Lwt.return (Error (`Msg "BLOCK function is unimplemented"))
|
|
| Error `Is_read_only -> Lwt.return (Error (`Msg "BLOCK device is read-only"))
|
|
| Error _ -> Lwt.return (Error (`Msg "Unknown error from BLOCK device"))
|
|
| Ok x -> Lwt.return (Ok x)
|
|
@@ -110,14 +108,12 @@ module Common(Log: S.LOG)(B: S.BLOCK) = struct
|
|
let open Lwt.Infix in
|
|
m >>= function
|
|
| Error `Disconnected -> Lwt.return (Error `Disconnected)
|
|
- | Error `Unimplemented -> Lwt.return (Error `Unimplemented)
|
|
| Error x -> Lwt.return (Error x)
|
|
| Ok x -> f x
|
|
let to_msg m =
|
|
let open Lwt.Infix in
|
|
m >>= function
|
|
| Error `Disconnected -> Lwt.return (Error (`Msg "BLOCK device has already disconnected"))
|
|
- | Error `Unimplemented -> Lwt.return (Error (`Msg "BLOCK function is unimplemented"))
|
|
| Error _ -> Lwt.return (Error (`Msg "Unknown error from BLOCK device"))
|
|
| Ok x -> Lwt.return (Ok x)
|
|
let return x = Lwt.return (Ok x)
|
|
diff --git a/shared-block-ring.opam b/shared-block-ring.opam
|
|
index 1c703fa..beb5c5b 100644
|
|
--- a/shared-block-ring.opam
|
|
+++ b/shared-block-ring.opam
|
|
@@ -21,8 +21,8 @@ depends: [
|
|
"logs"
|
|
"lwt"
|
|
"lwt_log"
|
|
- "mirage-block" {>= "2.0.1"}
|
|
- "mirage-block-unix"
|
|
+ "mirage-block" {>= "3.0.0"}
|
|
+ "mirage-block-unix" {>= "2.13.0"}
|
|
"mirage-clock" {>= "3.0.0"}
|
|
"mirage-clock-unix" {with-test}
|
|
"mirage-time" {>= "2.0.1"}
|