mirror of
https://github.com/akuker/RASCSI.git
synced 2025-01-10 17:30:47 +00:00
Reject inserting a medium when there is already a medium present (eject first)
This commit is contained in:
parent
d0eb629343
commit
5308a6e74d
@ -880,6 +880,10 @@ bool ProcessCmd(int fd, const PbDeviceDefinition& pbDevice, const PbOperation op
|
||||
|
||||
switch (operation) {
|
||||
case INSERT: {
|
||||
if (!device->IsRemoved()) {
|
||||
return ReturnStatus(fd, false, "Existing medium must first be ejected");
|
||||
}
|
||||
|
||||
if (!pbDevice.vendor().empty() || !pbDevice.product().empty() || !pbDevice.revision().empty()) {
|
||||
return ReturnStatus(fd, false, "Device name cannot be changed");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user