[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] preliminary BSD Disklabel support
From: |
Matt Wilson |
Subject: |
Re: [PATCH] preliminary BSD Disklabel support |
Date: |
Fri, 8 Dec 2000 18:33:04 -0500 |
User-agent: |
Mutt/1.2.5i |
On Fri, Dec 08, 2000 at 06:04:15PM -0500, Matt Wilson wrote:
Oops, a off by one:
> +static int
> +bsd_write (PedDisk* disk)
> +{
...
> + for (i = 0; i < BSD_MAXPARTITIONS; i++) {
> + part = ped_disk_get_partition (disk, i);
> + if (!part)
> + continue;
> + bsd_data = part->disk_specific;
> + label.d_partitions[i - 1].p_fstype = bsd_data->type;
> + label.d_partitions[i - 1].p_offset = part->geom.start;
> + label.d_partitions[i - 1].p_size = part->geom.length;
> + max_part = i;
> + }
Should be:
for (i = 0; i <= BSD_MAXPARTITIONS; i++) {
Matt