diff --git a/src/add-ons/kernel/partitioning_systems/atari/atari.cpp b/src/add-ons/kernel/partitioning_systems/atari/atari.cpp index de777b93cc..47d6edb1e8 100644 --- a/src/add-ons/kernel/partitioning_systems/atari/atari.cpp +++ b/src/add-ons/kernel/partitioning_systems/atari/atari.cpp @@ -176,11 +176,22 @@ atari_scan_partition(int fd, partition_data *partition, void *_cookie) TRACE(("atari: child partition exceeds existing space (%Ld bytes)\n", p->Size()*SECTSZ)); continue; } + if (!isalnum(p->id[0])) + continue; + if (!isalnum(p->id[1])) + continue; + if (!isalnum(p->id[2])) + continue; + partition_data *child = create_child_partition(partition->id, index, -1); if (child == NULL) { TRACE(("atari: Creating child at index %ld failed\n", index - 1)); return B_ERROR; } +#warning M68K: use a lookup table ? + char type[] = "??? Partition"; + memcpy(type, p->id, 3); + child->type = strdup(type); child->offset = partition->offset + p->Start() * (uint64)SECTSZ; child->size = p->Size() * (uint64)SECTSZ; child->block_size = SECTSZ; diff --git a/src/add-ons/kernel/partitioning_systems/atari/atari.h b/src/add-ons/kernel/partitioning_systems/atari/atari.h index c4d23f22bb..0f271b1035 100644 --- a/src/add-ons/kernel/partitioning_systems/atari/atari.h +++ b/src/add-ons/kernel/partitioning_systems/atari/atari.h @@ -14,7 +14,13 @@ struct atari_partition_entry { #define ATARI_PART_EXISTS 0x01 #define ATARI_PART_BOOTABLE 0x80 uint8 flags; - char id[3]; /* "GEM", ... should use "BFS" ? */ + /* some known types */ +#define ATARI_PART_TYEP_GEM 'G', 'E', 'M' +#define ATARI_PART_TYEP_LNX 'L', 'N', 'X' +#define ATARI_PART_TYEP_OS9 'O', 'S', '9' + /* the one we'll use */ +#define ATARI_PART_TYEP_BFS 'B', 'F', 'S' + char id[3]; uint32 start; uint32 size;