Subject: Re: bug#31111: Partition table wrongly identified as "atari"

From: Phil Susi <[email-masked]>
Date: Thu, 10 May 2018 13:53:21 -0400

On 4/10/2018 7:59 AM, bouke_1 wrote:
> I quickly looked through the atari_probe routine in the Atari patch
> code, and I may have found the logic error. At the bottom:
> 
>      } /* no XGM so try ICD */
> +         else if (atr_part_valid (&table.icd_part[0], rs_hd_size)
> +                  && atr_part_known (&table.icd_part[0],
> atr_known_icd_pid)) {
> +               for (i = 1; i < N_ICD; i++) {
> +                       if (atr_part_trash (&table.icd_part[i],
> rs_hd_size))
> +                               return 0;
> +               }
> +       }
> +
> +       return 1;
> + }
> 
> Correct me if I'm wrong (I know little about partitioning and less about
> atari disks), but it looks if the partition (or whatever) does not check
> out as "XGM" and either atr_part_valid  or atr_part_known  returns
> false, the routine will return 1 (meaning: this checks out as an atari
> disk).

I'd say so.  I can't reproduce the problem though by simply creating an
image file and making the partitions as you describe.  Can you send your
whole MBR so I can try to reproduce it and see if fixing this logic
error fixes it?