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

Phil Susi <[email protected]>
Newsgroups gmane.comp.gnu.parted.bugs
Message-ID <[email protected]>
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?
signature.asc (application/pgp-signature, 473 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJa9IcUAAoJENsuw7lhAP6ELjEH/1x8iyCeyNc8QfVsItaQDwYN
4RndXdzLrtm3kdpgoNTxwOXz41Xp3I2aXlXpL4tKeBh7W9BhxLbKgELPQe5kEoHH
urtNRAHm6tE8cuC8g6bFmf1PsYIfbwyWXG2QINuEo/rere/quMZLN9arMsy8UtcF
2XMgFB+eX23HT4eZf4z5t+k+LkPj1MZfTFUl+wdX8o7rC6saZmg4NLKts3s9lMds
osAQ8ws09g1/PUYJSSGj6VSKu5pFeLWTDbqyMtflt5ePfNj7qDdHjZBDqCBLYNVm
zpCeIdepbw5Nf4q9Pp4KgOga813UvGvqdGzWU6i/+kC5KxsnThU/WeudpQ+RwYg=
=bOMN
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.