Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
bsdutils
bsdisks
Commits
f1891d942806
Commit
f88743c2
authored
Oct 27, 2020
by
Gleb Popov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Call Drive::Eject for a correct device, instead of always /dev/cd0.
Reported by: swills
parent
c307ac80dc8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
drive.cpp
drive.cpp
+1
-1
No files found.
drive.cpp
View file @
f1891d94
...
...
@@ -39,7 +39,7 @@ void Drive::Eject(const QVariantMap &options)
if
(
!
optical
())
return
;
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
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment