Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
device: Rename getBlockDeviceNodeName to getPCIDeviceName
Browse files Browse the repository at this point in the history
Rename this function as it is a generic function that gets the
device name based on PCI address.

Signed-off-by: Archana Shinde <[email protected]>
  • Loading branch information
amshinde committed Aug 28, 2018
1 parent c9a4e2e commit 218ce89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions device.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func getDevicePCIAddress(pciID string) (string, error) {
return bridgeDevicePCIAddr, nil
}

func getBlockDeviceNodeName(s *sandbox, pciID string) (string, error) {
func getPCIDeviceName(s *sandbox, pciID string) (string, error) {
pciAddr, err := getDevicePCIAddress(pciID)
if err != nil {
return "", err
Expand Down Expand Up @@ -157,7 +157,7 @@ func getBlockDeviceNodeName(s *sandbox, pciID string) (string, error) {
// while deviceAddr is the address at which the device is attached on the bridge.
func virtioBlkDeviceHandler(device pb.Device, spec *pb.Spec, s *sandbox) error {
// Get the device node path based on the PCI device address
devPath, err := getBlockDeviceNodeName(s, device.Id)
devPath, err := getPCIDeviceName(s, device.Id)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func virtio9pStorageHandler(storage pb.Storage, s *sandbox) (string, error) {
func virtioBlkStorageHandler(storage pb.Storage, s *sandbox) (string, error) {
// Get the device node path based on the PCI address provided
// in Storage Source
devPath, err := getBlockDeviceNodeName(s, storage.Source)
devPath, err := getPCIDeviceName(s, storage.Source)
if err != nil {
return "", err
}
Expand Down

0 comments on commit 218ce89

Please sign in to comment.