mirror of
https://github.com/akuker/RASCSI.git
synced 2025-08-15 08:27:34 +00:00
Fixed detach, which did not remove the filename from the filenames set
This commit is contained in:
@@ -33,7 +33,7 @@
|
|||||||
#include "interfaces/scsi_block_commands.h"
|
#include "interfaces/scsi_block_commands.h"
|
||||||
#include "interfaces/scsi_primary_commands.h"
|
#include "interfaces/scsi_primary_commands.h"
|
||||||
|
|
||||||
class Disk : public Device, public ScsiPrimaryCommands, public ScsiBlockCommands
|
class Disk : public Device, ScsiPrimaryCommands, ScsiBlockCommands
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
enum access_mode { RW6, RW10, RW16 };
|
enum access_mode { RW6, RW10, RW16 };
|
||||||
|
@@ -862,12 +862,13 @@ bool ProcessCmd(int fd, const PbDeviceDefinition& pb_device, const PbOperation o
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FileSupport *fileSupport = dynamic_cast<FileSupport *>(device);
|
|
||||||
|
|
||||||
if (operation == DETACH) {
|
if (operation == DETACH) {
|
||||||
if (!dryRun) {
|
if (!dryRun) {
|
||||||
|
device = map[id * UnitNum + unit];
|
||||||
|
|
||||||
map[id * UnitNum + unit] = NULL;
|
map[id * UnitNum + unit] = NULL;
|
||||||
|
|
||||||
|
FileSupport *fileSupport = dynamic_cast<FileSupport *>(device);
|
||||||
if (fileSupport) {
|
if (fileSupport) {
|
||||||
Filepath filepath;
|
Filepath filepath;
|
||||||
fileSupport->GetPath(filepath);
|
fileSupport->GetPath(filepath);
|
||||||
@@ -886,6 +887,8 @@ bool ProcessCmd(int fd, const PbDeviceDefinition& pb_device, const PbOperation o
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FileSupport *fileSupport = dynamic_cast<FileSupport *>(device);
|
||||||
|
|
||||||
if ((operation == INSERT || operation == EJECT) && !device->IsRemovable()) {
|
if ((operation == INSERT || operation == EJECT) && !device->IsRemovable()) {
|
||||||
return ReturnStatus(fd, false, PbOperation_Name(operation) + " operation denied (" + device->GetType() + " isn't removable)");
|
return ReturnStatus(fd, false, PbOperation_Name(operation) + " operation denied (" + device->GetType() + " isn't removable)");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user