libcdio-devel
[Top][All Lists]
Advanced

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

Re: [Libcdio-devel] [PATCH] Try ejecting using eject command on Linux


From: Rocky Bernstein
Subject: Re: [Libcdio-devel] [PATCH] Try ejecting using eject command on Linux
Date: Fri, 12 Jun 2015 13:54:42 -0400

On Fri, Jun 12, 2015 at 10:57 AM, Robert Kausch <address@hidden>
wrote:

> Hi, I found that ejecting mounted CDs on Linux works when running as root
> only. The standard eject command, however, manages to eject such discs even
> when running as a normal user (it does not run setuid root).
>
> I spent some time trying to figure out why the libcdio code does not work
> as expected, but didn't find a solution. Running the eject utility in
> verbose mode you can see that it also fails trying standard cdrom ioctls,
> but succeeds using SGIO commands. I tried using its SGIO code in libcdio to
> no avail, however. Might try again in the future.
>
> My temporary solution is to invoke the eject command directly if ioctls
> and MMC commands fail. This is what the attached patch implements.
>
> @Rocky: If you don't object I would like to push the patch to git in a few
> days.
>

Here's a suggestion. Make a branch for this and push the patch to that.  If
we don't have a better solution by release time I'll make sure this branch
is merged back in. And with a branch, you can do that now if you want.


>
> Btw., I'm having a similar problem with the ejection code on OS X that I
> am yet to solve. The media_unmount_callback is never called (even though
> unmounting works fine) and so it doesn't get to the actual eject code. As a
> workaround, I'm currently calling cdio_eject_media_drive twice with a small
> timeout inbetween on OS X, but need to find a better solution / the reason
> why the callback does not fire.
>
> BR,
> Robert
> ----
> Robert Kausch
> address@hidden
>
>


reply via email to

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