diff options
Diffstat (limited to 'parted')
-rw-r--r-- | parted/parted.c | 37 | ||||
-rw-r--r-- | parted/ui.c | 9 |
2 files changed, 43 insertions, 3 deletions
diff --git a/parted/parted.c b/parted/parted.c index e6364bf..17b2b6c 100644 --- a/parted/parted.c +++ b/parted/parted.c @@ -1983,6 +1983,7 @@ _init_messages () StrList* list; int first; PedFileSystemType* fs_type; + PedFileSystemAlias* fs_alias; PedDiskType* disk_type; PedPartitionFlag part_flag; PedUnit unit; @@ -2039,7 +2040,7 @@ _init_messages () label_type_msg = str_list_convert (list); str_list_destroy (list); -/* mkfs - file system types */ +/* mkfs - file system types and aliases */ list = str_list_create (_(fs_type_msg_start), NULL); first = 1; @@ -2054,12 +2055,23 @@ _init_messages () str_list_append (list, ", "); str_list_append (list, fs_type->name); } + for (fs_alias = ped_file_system_alias_get_next (NULL); + fs_alias; fs_alias = ped_file_system_alias_get_next (fs_alias)) { + if (fs_alias->fs_type->ops->create == NULL) + continue; + + if (first) + first = 0; + else + str_list_append (list, ", "); + str_list_append (list, fs_alias->alias); + } str_list_append (list, "\n"); mkfs_fs_type_msg = str_list_convert (list); str_list_destroy (list); -/* mkpart - file system types */ +/* mkpart - file system types and aliases */ list = str_list_create (_(fs_type_msg_start), NULL); first = 1; @@ -2071,12 +2083,20 @@ _init_messages () str_list_append (list, ", "); str_list_append (list, fs_type->name); } + for (fs_alias = ped_file_system_alias_get_next (NULL); + fs_alias; fs_alias = ped_file_system_alias_get_next (fs_alias)) { + if (first) + first = 0; + else + str_list_append (list, ", "); + str_list_append (list, fs_alias->alias); + } str_list_append (list, "\n"); mkpart_fs_type_msg = str_list_convert (list); str_list_destroy (list); -/* resize - file system types */ +/* resize - file system types and aliases */ list = str_list_create (_(resize_msg_start), NULL); first = 1; @@ -2091,6 +2111,17 @@ _init_messages () str_list_append (list, ", "); str_list_append (list, fs_type->name); } + for (fs_alias = ped_file_system_alias_get_next (NULL); + fs_alias; fs_alias = ped_file_system_alias_get_next (fs_alias)) { + if (fs_alias->fs_type->ops->resize == NULL) + continue; + + if (first) + first = 0; + else + str_list_append (list, ", "); + str_list_append (list, fs_alias->alias); + } str_list_append (list, "\n"); resize_fs_type_msg = str_list_convert (list); diff --git a/parted/ui.c b/parted/ui.c index 7b2a248..f50536c 100644 --- a/parted/ui.c +++ b/parted/ui.c @@ -1347,6 +1347,7 @@ static int init_fs_type_str () { PedFileSystemType* walk; + PedFileSystemAlias* alias_walk; fs_type_list = NULL; @@ -1357,6 +1358,14 @@ init_fs_type_str () if (!fs_type_list) return 0; } + for (alias_walk = ped_file_system_alias_get_next (NULL); alias_walk; + alias_walk = ped_file_system_alias_get_next (alias_walk)) + { + fs_type_list = str_list_insert (fs_type_list, + alias_walk->alias); + if (!fs_type_list) + return 0; + } return 1; } |