From 37a03045751832e19cd8151b87e77da0878ca9b7 Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Tue, 24 Aug 2021 12:58:25 +0200 Subject: Add most common partition codes and filesystems To increase the compatibility of "Partition & format" (aka setup). --- ogcp/forms/action_forms.py | 16 ++++++++++++++++ ogcp/views.py | 20 ++++++++++++++++++-- 2 files changed, 34 insertions(+), 2 deletions(-) (limited to 'ogcp') diff --git a/ogcp/forms/action_forms.py b/ogcp/forms/action_forms.py index 1be2120..1722d8b 100644 --- a/ogcp/forms/action_forms.py +++ b/ogcp/forms/action_forms.py @@ -26,10 +26,26 @@ class PartitionForm(FlaskForm): part_type = SelectField(label=_('Type'), choices=[('LINUX', 'Linux'), ('NTFS', 'NTFS'), + ('CACHE', 'CACHE'), + ('EFI', 'EFI'), + ('DATA', 'DATA'), + ('LINUX-SWAP', 'LINUX-SWAP'), + ('EXTENDED', 'EXTENDED'), + ('FAT32', 'FAT32'), + ('LINUX-LVM', 'LINUX-LVM'), + ('LINUX-RAID', 'LINUX-RAID'), + ('WIN-RECOV', 'WIN-RECOV'), + ('HNTFS', 'HNTFS'), + ('HFAT32', 'HFAT32'), + ('HNTFS-WINRE', 'HNTFS-WINRE'), ('EMPTY', 'Empty')]) fs = SelectField(label=_('Filesystem'), choices=[('EXT4', 'EXT4'), ('NTFS', 'NTFS'), + ('CACHE', 'CACHE'), + ('LINUX-SWAP', 'LINUX-SWAP'), + ('FAT32', 'FAT32'), + ('EXFAT', 'EXFAT'), ('EMPTY', 'Empty')]) size = IntegerField(label=_('Size (KB)')) format_partition = BooleanField(label=_('Format')) diff --git a/ogcp/views.py b/ogcp/views.py index 0e0f9ee..72ca1b1 100644 --- a/ogcp/views.py +++ b/ogcp/views.py @@ -33,19 +33,35 @@ FS_CODES = { 2: 'CACHE', 6: 'EXT4', 9: 'FAT32', - 13: 'NTFS' + 13: 'NTFS', + 18: 'EXFAT', + 19: 'LINUX-SWAP' } PART_TYPE_CODES = { 0: 'EMPTY', 1: 'DISK', + 5: 'EXTENDED', 7: 'NTFS', + 11: 'FAT32', + 23: 'HNTFS', + 27: 'HFAT32', + 39: 'HNTFS-WINRE', + 130: 'LINUX-SWAP', 131: 'LINUX', + 142: 'LINUX-LVM', 202: 'CACHE', 218: 'DATA', + 253: 'LINUX-RAID', 1792: 'NTFS', + 9984: 'WIN-RECOV', + 33280: 'LINUX-SWAP', 33536: 'LINUX', - 61184: 'EFI' + 36352: 'LINUX-LVM', + 51712: 'CACHE', + 61184: 'EFI', + 64768: 'LINUX-RAID', + 65535: 'UNKNOWN' } PART_SCHEME_CODES = { -- cgit v1.2.3-18-g5258