Skip to content

Commit d471d38

Browse files
author
Frediano Ziglio
committed
Rename encode_bdf function
Specify that the function use the segment too. No functional changes. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
1 parent 3364e6a commit d471d38

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ocaml/xenopsd/xc/device.ml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,24 +1170,24 @@ module PCI = struct
11701170
(* Sort into the order the devices were plugged *)
11711171
List.sort (fun a b -> compare (fst a) (fst b)) pairs
11721172

1173-
let encode_bdf pci =
1173+
let encode_sbdf pci =
11741174
(pci.Xenops_interface.Pci.domain lsl 16)
11751175
lor ((pci.bus land 0xff) lsl 8)
11761176
lor ((pci.dev land 0x1f) lsl 3)
11771177
lor (pci.fn land 0x7)
11781178

11791179
let _quarantine pci quarantine =
11801180
if !Xenopsd.pci_quarantine then
1181-
let pci_bdf = encode_bdf pci in
1181+
let pci_sbdf = encode_sbdf pci in
11821182
let domid = Xenctrlext.domid_quarantine () in
11831183
let xcext = Xenctrlext.get_handle () in
11841184
try
11851185
match quarantine with
11861186
| true ->
1187-
Xenctrlext.assign_device xcext domid pci_bdf 0 ;
1187+
Xenctrlext.assign_device xcext domid pci_sbdf 0 ;
11881188
true
11891189
| false ->
1190-
Xenctrlext.deassign_device xcext domid pci_bdf ;
1190+
Xenctrlext.deassign_device xcext domid pci_sbdf ;
11911191
true
11921192
with
11931193
| Xenctrlext.Unix_error (Unix.ESRCH, _) ->
@@ -1242,7 +1242,7 @@ module PCI = struct
12421242
in
12431243
let xcext = Xenctrlext.get_handle () in
12441244
ignore (quarantine host) ;
1245-
Xenctrlext.assign_device xcext domid (encode_bdf host)
1245+
Xenctrlext.assign_device xcext domid (encode_sbdf host)
12461246
_xen_domctl_dev_rdm_relaxed ;
12471247
List.iteri apply_io_permission addresses ;
12481248
( if irq > 0 then

0 commit comments

Comments
 (0)