From 73adc13bc0037aaf03409ae3e0d5f3e32a68af2f Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Wed, 26 Jun 2013 17:21:54 +0300 Subject: [PATCH] Revert "VfatDiskMount: do not initialize uuid" 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 --- mic/utils/fs_related.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mic/utils/fs_related.py b/mic/utils/fs_related.py index a5599c6..5292e13 100644 --- a/mic/utils/fs_related.py +++ b/mic/utils/fs_related.py @@ -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)) -- 2.7.4