diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2021-08-24 12:58:25 +0200 |
---|---|---|
committer | soleta <soleta@soleta.eu> | 2021-08-24 13:35:42 +0200 |
commit | 37a03045751832e19cd8151b87e77da0878ca9b7 (patch) | |
tree | 018ba23f99ca7a00799958fe4127e63bbc3a220a /ogcp | |
parent | 0bbae508f60b86cb77c3f05e43d4e86bb5d2980d (diff) |
Add most common partition codes and filesystems
To increase the compatibility of "Partition & format" (aka setup).
Diffstat (limited to 'ogcp')
-rw-r--r-- | ogcp/forms/action_forms.py | 16 | ||||
-rw-r--r-- | ogcp/views.py | 20 |
2 files changed, 34 insertions, 2 deletions
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 = { |