Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate vendor id 0x1af4 to Virtio Block Device (#1242117) #1313

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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