bug-parted
[Top][All Lists]
Advanced

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

Re: Removing "pointless" exception for exotic block devices causes probe


From: Colin Watson
Subject: Re: Removing "pointless" exception for exotic block devices causes probe to find CDs
Date: Sat, 4 Dec 2004 11:38:30 +0000
User-agent: Mutt/1.3.28i

On Sat, Dec 04, 2004 at 09:56:09PM +1100, Andrew Clausen wrote:
> On Sat, Dec 04, 2004 at 10:40:52AM +0000, Colin Watson wrote:
> > +2004-11-21  Andrew Clausen <address@hidden>
> > +* libparted/linux.c (linux_new): get rid of pointless exception for
> > +  exotic block devices.
> > 
> > -       if (ioctl (arch_specific->fd, HDIO_GETGEO, &geometry)) {
> > -               ped_exception_throw (PED_EXCEPTION_ERROR,
> > -                                    PED_EXCEPTION_CANCEL,
> > -                                    _("Could not read geometry of %s - 
> > %s."),
> > -                                    dev->path, strerror (errno));
> > -               goto error;
> > -       }
> > 
> > This causes ped_device_probe_all() to find CD drives, which causes the
> > Debian installer's partition manager to offer CD drives for
> > partitioning, which of course is not terribly useful and makes the UI
> > very confusing. I suspect the same applies to other parted frontends.
> > Can this change be backed out?
> 
> I would rather we had some other mechanism for detecting CD drives
> and other read-only media.  Clearly, the CD thing is purely a
> side-effect.

Ah; so perhaps frontends should simply check PedDevice->read_only, which
looks like it'll always be set if applicable after
ped_device_probe_all()? I can live with that, and it seems to work.

It'd be nice if this were flagged as an interface change, though.

Thanks,

-- 
Colin Watson                                  address@hidden




reply via email to

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