projects
/
vuplus_dvbapp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
077f312
)
[DeviceManager] Support format a VFAT filesystem larger than 2GB
author
hschang
<chang@dev3>
Wed, 23 Jul 2014 06:14:58 +0000
(15:14 +0900)
committer
hschang
<chang@dev3>
Mon, 4 Aug 2014 09:12:08 +0000
(18:12 +0900)
lib/python/Plugins/SystemPlugins/DeviceManager/plugin.py
patch
|
blob
|
history
diff --git
a/lib/python/Plugins/SystemPlugins/DeviceManager/plugin.py
b/lib/python/Plugins/SystemPlugins/DeviceManager/plugin.py
index
86aa991
..
c83d161
100755
(executable)
--- 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
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
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
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
self.deviceFormatConsole.ePopen(cmd, self.mkfsFinished)
else:
errorMsg = _("Can not format device /dev/%s.\nrefresh partition information failed!")%partition