bug-parted
[Top][All Lists]
Advanced

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

Re: Parted 1.6.21 finds partitions on DVD-ROM drives -- Bug or feature?


From: Andrew Clausen
Subject: Re: Parted 1.6.21 finds partitions on DVD-ROM drives -- Bug or feature?
Date: Sat, 5 Mar 2005 03:47:55 +1100
User-agent: Mutt/1.3.28i

On Wed, Mar 02, 2005 at 10:24:01PM +0100, Bernhard Rosenkraenzer wrote:
> SSIA -- this code fragment
> 
> PedDevice *dev=0;
> while(dev=ped_device_get_next(dev)) {
>       puts(dev->path);
> }
> 
> Prints out all my harddisks as expected - but additionally, it prints all 
> DVD-ROM drives that have a disk in them, and even claims there's a partition 
> (which is obviously not true). (e.g. I get
> /dev/hda1     [Correct -- my swap partition]
> /dev/hda2     [Correct -- my / partition]
> /dev/hdc1     [Incorrect -- /dev/hdc is my DVD-ROM]
> )
> 
> Verified on Linux 2.6.11-rc5-mm1, parted 1.6.21.
> 
> Is this a bug or some sort of feature I fail to understand?

Probably the latter.  i.e. The DVD probably has a partition table on it.
(I don't have a DVD drive, so I wouldn't know!)  If you send me
the first 512 bytes of the DVD, I can check:

        dd if=/dev/hdc of=dvd-image bs=512 count=1

> If it's a feature, what's the best way to get only harddisks? I'm currently 
> checking for sector_size==2048, but that's suboptimal...

No idea.  If you find an answer, please let me know!  Perhaps attempting
to open it read/write?

Cheers,
Andrew




reply via email to

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