bug-parted
[Top][All Lists]
Advanced

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

Re: python (parted) question


From: Paul Telford
Subject: Re: python (parted) question
Date: Wed, 17 Sep 2003 11:24:15 -0700 (PDT)

[ removed debian-python from CC list, as i think it is offtopic for them 
by this point ]

On Fri, 12 Sep 2003, Andrew Clausen wrote:

> So, to begin... could you stick a ped_disk_print((PedDisk*)o->obj)
> call in the above function?

Thanks, I did as you suggested, which gave me some clues and led to some
further printf's as I traced back the problem.  I now think the problem is
first occuring with ped_disk_add_partition().  I have code that looks
like:

        foo = ped_disk_add_partition((PedDisk *)o->obj,((PedPartition 
*)o2->obj),
                    ped_constraint_any((PedDevice *)o->obj));

This line is from python-parted (the distributed version does not check
the return code of that function though, which I think is dangerous).  
After the above, foo == 0.  I added in a printf above that line as
follows:

        printf("o = %s, o2 = %s\n", ((PedDisk *)o->obj)->type->name,
                ((PedPartition *)o2->obj));

That results in: "o = msdos, o2 = ".  So I'm guessing the PedPartition is
incorrect, or maybe my printf is just wrong.  I'm not familiar enough with
the structures to really know the best parts to be printing.  Does it look
like I'm on the right track here?


Thanks,



--
Paul Telford | 1024D/431B38BA | address@hidden | address@hidden
       C903 0E85 9AF5 1B80 6A5F  F169 D7E9 4363 431B 38BA







reply via email to

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