sculpt manager: support GEMDOS file systems

Pass the distinction between GEMDOS and MSDOS file systems from
part-block reports to the vfs_rump plugin.

Fixes #3471
This commit is contained in:
Norman Feske 2019-08-10 12:15:52 +02:00 committed by Christian Helmuth
parent 114de7721f
commit 874172ca76
2 changed files with 10 additions and 5 deletions

View File

@ -29,9 +29,9 @@ namespace Sculpt {
struct Sculpt::File_system
{
enum Type { UNKNOWN, EXT2, FAT32 } type;
enum Type { UNKNOWN, EXT2, FAT32, GEMDOS } type;
bool accessible() const { return type == EXT2 || type == FAT32; }
bool accessible() const { return type == EXT2 || type == FAT32 || type == GEMDOS; }
bool expandable() const { return type == EXT2; }
@ -99,9 +99,10 @@ struct Sculpt::Partition : List_model<Partition>::Element
static Args from_xml(Xml_node node)
{
auto const file_system = node.attribute_value("file_system", String<16>());
File_system::Type const fs_type = (file_system == "Ext2") ? File_system::EXT2
: (file_system == "FAT32") ? File_system::FAT32
: File_system::UNKNOWN;
File_system::Type const fs_type = (file_system == "Ext2") ? File_system::EXT2
: (file_system == "GEMDOS") ? File_system::GEMDOS
: (file_system == "FAT32") ? File_system::FAT32
: File_system::UNKNOWN;
Number const number = node.attribute_value("number", Number());

View File

@ -30,6 +30,10 @@ void Sculpt::gen_fs_start_content(Xml_generator &xml,
switch (fs_type) {
case File_system::EXT2: xml.attribute("fs", "ext2fs"); break;
case File_system::FAT32: xml.attribute("fs", "msdos"); break;
case File_system::GEMDOS:
xml.attribute("fs", "msdos");
xml.attribute("gemdos", "yes");
break;
case File_system::UNKNOWN: break;
};
xml.attribute("ram", "48M");