hurd-devel
[Top][All Lists]
Advanced

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

re:


From: Andrew Clausen
Subject: re:
Date: Sun, 2 Sep 2001 17:15:18 +1000
User-agent: Mutt/1.2.5i

Hi all,

I just noticed neal wrote:


  for (part =3D ped_disk_next_partition (disk, NULL); part;
       part =3D ped_disk_next_partition (disk, part))
    {
      if (part->type !=3D PED_PARTITION_LOGICAL
          && part->type !=3D 0 /* PED_PARTITION_PRIMARY */)
        continue;

      assert (part->num);
      if (part->num =3D=3D index)
        break;
    }


That can be replaced with:

   part = ped_disk_get_partition (disk, index);

(You might want to filter out the extended partition, but that's still
easier than going through the list manually!)

Andrew




reply via email to

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