projects
/
snf-image-creator
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
330fd61
)
Use vfs_uuid instead of blkid to compute uuid
author
Nikos Skalkotos
<skalkoto@grnet.gr>
Mon, 25 Jun 2012 11:39:09 +0000
(14:39 +0300)
committer
Nikos Skalkotos
<skalkoto@grnet.gr>
Mon, 25 Jun 2012 11:39:09 +0000
(14:39 +0300)
vfs_uuid is more suitable for this and it whas added before blkid
in guestfs, hence it is supported in more guestfs versions.
image_creator/os_type/linux.py
patch
|
blob
|
history
diff --git
a/image_creator/os_type/linux.py
b/image_creator/os_type/linux.py
index
e38e777
..
89d5e32
100644
(file)
--- a/
image_creator/os_type/linux.py
+++ b/
image_creator/os_type/linux.py
@@
-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
@sysprep()
def fix_acpid(self, print_header=True):