Commit 20409e9f authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Use vfs_uuid instead of blkid to compute uuid

vfs_uuid is more suitable for this and it whas added before blkid
in guestfs, hence it is supported in more guestfs versions.
parent 330fd618
......@@ -50,10 +50,10 @@ class Linux(Unix):
if dev in self._uuid:
return self._uuid[dev]
for attr in self.g.blkid(dev):
if attr[0] == 'UUID':
self._uuid[dev] = attr[1]
return attr[1]
uuid = self.g.vfs_uuid(dev)
assert len(uuid)
self._uuid[dev] = uuid
return uuid
def fix_acpid(self, print_header=True):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment