Skip to content

Commit

Permalink
Merge pull request #1313 from vojtechtrefny/main_virtio-description-fix
Browse files Browse the repository at this point in the history
Translate vendor id 0x1af4 to Virtio Block Device (#1242117)
  • Loading branch information
vojtechtrefny authored Nov 4, 2024
2 parents 5162f0c + 874f8f5 commit 50a96d5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion blivet/devices/disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,11 @@ def media_present(self):

@property
def description(self):
return " ".join(s for s in (self.vendor, self.model, self.wwn) if s)
# On Virtio block devices the vendor is 0x1af4, make it more friendly
if self.vendor == "0x1af4":
return "Virtio Block Device"
else:
return " ".join(s for s in (self.vendor, self.model, self.wwn) if s)

def _pre_destroy(self):
""" Destroy the device. """
Expand Down

0 comments on commit 50a96d5

Please sign in to comment.