From: Artem Bityutskiy Date: Wed, 26 Jun 2013 14:21:54 +0000 (+0300) Subject: Revert "VfatDiskMount: do not initialize uuid" X-Git-Tag: 0.20~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=73adc13bc0037aaf03409ae3e0d5f3e32a68af2f;p=tools%2Fmic.git 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 --- 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))