[parted-devel] Bug#239816: [PATCH 2/2] libparted: Add support for atari partition tables

Colin Watson cjwatson at debian.org
Fri Dec 9 12:57:18 UTC 2016


Thanks for this.  I've satisfied myself that it shouldn't cause problems
on other systems, so I've gone ahead and applied these patches to Debian
unstable, though I expect I may need to refresh them at some point.

A few minor comments, although I haven't reviewed the Atari-specific
details:

On Sun, Dec 04, 2016 at 05:12:46PM +0100, John Paul Adrian Glaubitz wrote:
> +static int
> +atr_part_correct (AtariRawPartition* part, uint32_t hd_size)
> +{
> +	uint32_t start, size;
> +
> +	start = PED_BE32_TO_CPU (part->start);
> +	size = PED_BE32_TO_CPU (part->size);
> +
> +	return isalnum_l(part->id[0], atr_c_locale)
> +		&& isalnum_l(part->id[1], atr_c_locale)
> +		&& isalnum_l(part->id[2], atr_c_locale)
> +		&& atr_start_size_correct (start, size, hd_size);
> +}

I'd be inclined to just hand-roll a C-flavoured isalnum equivalent
rather than bothering to instantiate a custom locale.

> @@ -96,6 +97,7 @@ init_disk_types ()
>  	ped_disk_bsd_init ();
>  	ped_disk_amiga_init ();
>  	ped_disk_aix_init ();
> +	ped_disk_atari_init ();
>  }

Aside from dasd, these seem to be mostly reverse-alphabetical except
that atari is now slightly out of sequence.  Any reason for that?
(Ditto in done_disk_types.)

Also, "git am" whinges about various minor whitespace things, which you
should correct:

.git/rebase-apply/patch:710: space before tab in indent.
                                        disk,
.git/rebase-apply/patch:711: space before tab in indent.
                                        PED_BE32_TO_CPU (table.part[i].start),
.git/rebase-apply/patch:712: space before tab in indent.
                                        &pnum ) )
.git/rebase-apply/patch:1460: space before tab in indent.
                                                < min_start ) ) {
.git/rebase-apply/patch:1721: space before tab in indent.
                                           | PED_PARTITION_EXTENDED))

Cheers,

-- 
Colin Watson                                       [cjwatson at debian.org]



More information about the parted-devel mailing list