Skip to content

Commit

Permalink
update API method name
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieu committed Apr 26, 2024
1 parent f1e16ef commit b173b2c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/xo-web/src/common/xo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1311,15 +1311,16 @@ export const hidePcis = async (pcis, hide) => {
try {
await confirm({
body: _('applyChangeOnPcis', { nPcis: pcis.length }),
// hide `true` means that we will disable dom0's PCI access, so we will "enable" the possibility of passthrough this PCI
title: _(hide ? 'pcisEnable' : 'pcisDisable', { nPcis: pcis.length }),
})
} catch (error) {
return
}
return _call('pci.hide', { pcis: resolveIds(pcis), hide })
return _call('pci.disableDom0Access', { pcis: resolveIds(pcis), disable: hide })
}

export const isPciHidden = pci => _call('pci.isHidden', { id: resolveId(pci) })
export const isPciHidden = async pci => (await _call('pci.getDom0AccessStatus', { id: resolveId(pci) })) === 'disabled'

// ATM, unknown date for the availablity on XS, since they are doing rolling release
// FIXME: When XS release methods to do PCI passthrough, update this check
Expand Down

0 comments on commit b173b2c

Please sign in to comment.