aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlib/isodumper.py6
-rwxr-xr-xlib/raw_format.py13
2 files changed, 15 insertions, 4 deletions
diff --git a/lib/isodumper.py b/lib/isodumper.py
index 9c34e15..785c996 100755
--- a/lib/isodumper.py
+++ b/lib/isodumper.py
@@ -585,6 +585,8 @@ NTFS or ext. You can specify a volume name and the format in a new dialog box.<B
vb_c = atelier.createVBox(cr)
vb_c1 = atelier.createHBox(vb_c)
format_fat = atelier.createRadioButton(atelier.createLeft(vb_c1),_("FAT 32 (Windows)"))
+ vb_c4 = atelier.createHBox(vb_c)
+ format_exfat = atelier.createRadioButton(atelier.createLeft(vb_c4),_("exFAT (Windows))"))
vb_c2 = atelier.createHBox(vb_c)
format_ntfs = atelier.createRadioButton(atelier.createLeft(vb_c2),_("NTFS (Windows)"))
vb_c3 = atelier.createHBox(vb_c)
@@ -604,6 +606,10 @@ NTFS or ext. You can specify a volume name and the format in a new dialog box.<B
format_type = 'fat32'
format_label = label.value().upper()[:11]
break
+ if format_exfat.value():
+ format_type = 'exfat'
+ format_label = label.value()[:32]
+ break
if format_ntfs.value():
format_type = 'ntfs'
format_label = label.value()[:32]
diff --git a/lib/raw_format.py b/lib/raw_format.py
index 0cce0e9..54e7bcb 100755
--- a/lib/raw_format.py
+++ b/lib/raw_format.py
@@ -97,7 +97,10 @@ def raw_format(device_path, fstype, volume_label, uid, gid):
sys.exit(5)
# fstype
- fs = parted.FileSystem(type=fstype, geometry=geometry)
+ _fstype = fstype
+ if _fstype == "exfat":
+ _fstype = "ntfs"
+ fs = parted.FileSystem(type=_fstype, geometry=geometry)
# Create partition
partition = parted.Partition(disk=disk, type=parted.PARTITION_NORMAL, geometry=geometry, fs=fs)
@@ -108,7 +111,9 @@ def raw_format(device_path, fstype, volume_label, uid, gid):
# Format partition according to the fstype specified
if fstype == "fat32":
call(["mkdosfs", "-F", "32", "-n", volume_label, partition.path])
- if fstype == "ntfs":
+ elif fstype == "exfat":
+ call(["mkfs.exfat", "-n", volume_label, partition.path])
+ elif fstype == "ntfs":
call(["mkntfs", "-f", "-L", volume_label, partition.path])
elif fstype == "ext4":
call(["mkfs.ext4", "-E", "root_owner=%s:%s" % (uid, gid), "-L", volume_label, partition.path])
@@ -140,8 +145,8 @@ def main():
elif o in ("-d"):
device = a
elif o in ("-f"):
- if a not in [ "fat32", "ntfs", "ext4" ]:
- print("Specify fat32, ntfs or ext4")
+ if a not in [ "fat32","exfat", "ntfs", "ext4" ]:
+ print("Specify fat32, exfat, ntfs or ext4")
sys.exit(3)
fstype = a
elif o in ("-l"):