Commit f88743c2 authored by Gleb Popov's avatar Gleb Popov

Call Drive::Eject for a correct device, instead of always /dev/cd0.

Reported by: swills
parent c307ac80dc8d
......@@ -39,7 +39,7 @@ void Drive::Eject(const QVariantMap &options)
int fd = open("/dev/cd0", O_RDONLY);
int fd = open((QStringLiteral("/dev/") + geomName).toLocal8Bit().constData(), O_RDONLY);
if (fd < 0 && errno != ENXIO) {
QString errorMessage = ::strerror(errno);
connection().send(message().createErrorReply("org.freedesktop.UDisks2.Error.Failed", errorMessage));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment