Revert "VfatDiskMount: do not initialize uuid"
authorArtem Bityutskiy <artem.bityutskiy@intel.com>
Wed, 26 Jun 2013 14:21:54 +0000 (17:21 +0300)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Wed, 26 Jun 2013 14:22:04 +0000 (17:22 +0300)
This reverts commit 83410bc120b1f214401517f00da86c53e9f3d1b2.

This patch is actually wrong. I discovered that FATFS actually _does_ support
UUID, it is just shorted - it is a 32-bit integer, but has to have the
'XXXX-XXXX' format for fstab.

Let's revert this patch and fix the problem properly.

Change-Id: I1d2019f2f93094d8e222b926ac2519e8e9b9c0b5
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
mic/utils/fs_related.py

index a5599c6..5292e13 100644 (file)
@@ -550,7 +550,7 @@ class VfatDiskMount(DiskMount):
         DiskMount.__init__(self, disk, mountdir, fstype, rmmountdir)
         self.blocksize = blocksize
         self.fslabel = fslabel.replace("/", "")
-        self.uuid = None
+        self.uuid = "%08X" % int(time.time())
         self.skipformat = skipformat
         self.fsopts = fsopts
         self.fsckcmd = find_binary_path("fsck." + self.fstype)
@@ -561,7 +561,7 @@ class VfatDiskMount(DiskMount):
             return
 
         msger.verbose("Formating %s filesystem on %s" % (self.fstype, self.disk.device))
-        rc = runner.show([self.mkfscmd, "-n", self.fslabel, self.disk.device])
+        rc = runner.show([self.mkfscmd, "-n", self.fslabel, "-i", self.uuid, self.disk.device])
         if rc != 0:
             raise MountError("Error creating %s filesystem on disk %s" % (self.fstype,self.disk.device))