[Top][All Lists]

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

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

From: Robert Kausch
Subject: Re: [Libcdio-devel] [PATCH] Try ejecting using eject command on Linux
Date: Fri, 12 Jun 2015 17:19:39 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Thunderbird/36.0

Hm, looks like something ate my patch...

It clearly has the patch attached in my sent mails folder.

Trying again...

Am 12.06.2015 um 16:57 schrieb Robert Kausch:
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.

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.

Robert Kausch

reply via email to

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