bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug report


From: Denis Frolov
Subject: Re: Bug report
Date: Sun, 22 Jun 2003 09:21:08 +0200

That was the following code ( printed not complete for non-useful info ):

// init disk info
PartedWrap::PartedWrap
{
  ped_device_probe_all ();
  PedDevice * dev = 0;
  int i = 1;
  do
  {
    dev = ped_device_get_next ( dev );
    if ( dev != 0 )
    {
      PedDisk disk = *ped_disk_new ( dev );
      disks [ i ] = disk;
      i++;
    }
  } while ( dev != 0 );
}

// all checks not printed, of course I check every pointer value returned...
long long PartedWrap::getPartMaxSize ( const int partNum, const int
diskNum )
{
  PedDisk * disk = &disks [ diskNum ];
  PedPartition * part = ped_disk_get_partition ( disk, partNum );
  PedConstraint * constraint = ped_constraint_any ( disk->dev );

// this function prints warning and returns 0
// looking into source and trying to modify the code got following result:
// ped_disk_get_max_partition_geometry calls
// ped_disk_maximize_partition, which calls
// ped_disk_set_partition_geom in which asserrtion fails, so
// possibly ped_disk_maximize_partition is buggy, or my program.
  PedGeometry * max_geom = ped_disk_get_max_partition_geometry ( disk, part,
constraint );

  if ( max_geom != 0 ) return max_geom->length;
  return 0;
}

int main ()
{
  PartedWrap pw = PartedWrap ();
  int hd_count = pw.getHardDiskCount ();
  int i, j;
  for ( i=1; i<=hd_count; i++ )
  {
    int pt_count = pw.getHardDiskPartCount ( i );
    for ( j=1; j<=pt_count; j++ )
    {
      std::cout << "part max size is: " << pw.getPartMaxSize ( j, i );
    }
  }
  return 0;
}


----- Original Message -----
From: "Andrew Clausen" <address@hidden>
To: "Denis Frolov" <address@hidden>
Cc: <address@hidden>
Sent: Sunday, June 22, 2003 11:26 AM
Subject: Re: Bug report


> On Thu, Jun 19, 2003 at 08:24:32PM +0300, Denis Frolov wrote:
> > I have such a message for you, as the program I have compiled directed
me to
> > send it:
>
> Which program were you compiling?
>
> > version (1.6.5)
> >
> > Assertion (part->disk == disk) at disk.c:1565 in function
> > ped_disk_set_partition_geom() failed.
>
> What did you type that made this happen?
>
> Thanks!
> Andrew
>
>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]