Skip to content

Commit

Permalink
[iec][fuji] mount drive.
Browse files Browse the repository at this point in the history
  • Loading branch information
tschak909 committed Jun 30, 2023
1 parent b7a2ed4 commit e0b9ade
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/device/iec/fuji.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ void iecFuji::mount_host()
// Disk Image Mount
void iecFuji::disk_image_mount()
{
std::vector<std::string> t = util_tokenize(payload, ':');
_populate_slots_from_config();
std::vector<std::string> t = util_tokenize(payload, ',');
if (t.size() < 3)
{
response_queue.push("error: invalid # of parameters\r");
Expand All @@ -340,7 +341,7 @@ void iecFuji::disk_image_mount()

if (!_validate_device_slot(ds))
{
response_queue.push("error: invalid device slot\r");
response = "invalid device slot.";
return; // error.
}

Expand All @@ -358,7 +359,7 @@ void iecFuji::disk_image_mount()

if (disk.fileh == nullptr)
{
response_queue.push("error: no file handle\r");
response = "no file handle";
return;
}

Expand All @@ -370,7 +371,7 @@ void iecFuji::disk_image_mount()

// And now mount it
disk.disk_type = disk.disk_dev.mount(disk.fileh, disk.filename, disk.disk_size);
response_queue.push("ok\r");
response = "mounted";
}

// Toggle boot config on/off, aux1=0 is disabled, aux1=1 is enabled
Expand Down

0 comments on commit e0b9ade

Please sign in to comment.