Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mirage/mirage
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 76bd99a3cbcb
Choose a base ref
...
head repository: mirage/mirage
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0983925ada2d
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Dec 4, 2017

  1. Copy the full SHA
    bf0c3ba View commit details

Commits on Dec 17, 2017

  1. Merge pull request #874 from yomimono/block_of_file

    allow access to xen block devices other than the first
    djs55 authored Dec 17, 2017
    Copy the full SHA
    0983925 View commit details
Showing with 3 additions and 6 deletions.
  1. +3 −6 lib/mirage.ml
9 changes: 3 additions & 6 deletions lib/mirage.ml
Original file line number Diff line number Diff line change
@@ -391,12 +391,9 @@ class block_conf file =
| `Unix | `MacOSX | `Virtio | `Ukvm ->
Fpath.(to_string (root / b.filename)) (* open the file directly *)
| `Xen | `Qubes ->
(* We need the xenstore id *)
(* Taken from https://github.com/mirage/mirage-block-xen/blob/
a64d152586c7ebc1d23c5adaa4ddd440b45a3a83/lib/device_number.ml#L64 *)
(if b. number < 16
then (202 lsl 8) lor (b.number lsl 4)
else (1 lsl 28) lor (b.number lsl 8)) |> string_of_int
(* don't try to infer anything about this filename - let
mirage-block-xen do that for us; it has better heuristics *)
b.filename

method! connect i s _ =
Fmt.strf "%s.connect %S" s