From f3685dcfbbf65fe723403c32f2389fd9c0479d0d Mon Sep 17 00:00:00 2001 From: hschang Date: Wed, 23 Jul 2014 15:14:58 +0900 Subject: [PATCH] [DeviceManager] Support format a VFAT filesystem larger than 2GB --- lib/python/Plugins/SystemPlugins/DeviceManager/plugin.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/python/Plugins/SystemPlugins/DeviceManager/plugin.py b/lib/python/Plugins/SystemPlugins/DeviceManager/plugin.py index 86aa991..c83d161 100755 --- a/lib/python/Plugins/SystemPlugins/DeviceManager/plugin.py +++ b/lib/python/Plugins/SystemPlugins/DeviceManager/plugin.py @@ -799,6 +799,9 @@ class DeviceInit(Screen): cmd = "/usr/sbin/mkfs.vfat -I -S4096 " + fulldevicename else: cmd = "/usr/sbin/mkfs.vfat -I " + fulldevicename + if partitionsize > 2 * 1024 * 1024: # if partiton size larger then 2GB, use FAT32 + cmd += " -F 32" + else: self.createFilesystemFinished(None, -1, (self.device, fulldevicename)) return @@ -1095,6 +1098,8 @@ class DeviceFormat(Screen): cmd = "/usr/sbin/mkfs.vfat -I -S4096 /dev/" + partition else: cmd = "/usr/sbin/mkfs.vfat -I /dev/" + partition + if size > 2 * 1024: # if partiton size larger then 2GB, use FAT32 + cmd += " -F 32" self.deviceFormatConsole.ePopen(cmd, self.mkfsFinished) else: errorMsg = _("Can not format device /dev/%s.\nrefresh partition information failed!")%partition -- 2.7.4