Skip to content

Commit

Permalink
[iec][fuji] get_device_filename()
Browse files Browse the repository at this point in the history
  • Loading branch information
tschak909 committed Jul 1, 2023
1 parent 59faad9 commit daffdd4
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions lib/device/iec/fuji.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1461,7 +1461,7 @@ void iecFuji::get_device_filename()
if (t.size() < 2)
{
Debug_printf("Incorrect # of parameters.\n");
response_queue.push("error: invalid # of parameters\r");
response = "invalid # of parameters";
// Send error
return;
}
Expand All @@ -1472,24 +1472,13 @@ void iecFuji::get_device_filename()
if (!_validate_device_slot(ds, "get_device_filename"))
{
Debug_printf("Invalid device slot: %u\n", ds);
response_queue.push("error: invalid device slot\r");
response = "invalid device slot";
// send error
return;
}

std::string reply = std::string(_fnDisks[ds].filename);

if (payload[0] == FUJICMD_GET_DEVICE_FULLPATH)
{
status_override = reply;
}
else
{
iecStatus.channel = CHANNEL_COMMAND;
iecStatus.error = ds;
iecStatus.connected = 1;
iecStatus.msg = reply;
}
response = reply;
}

// Mounts the desired boot disk number
Expand Down

0 comments on commit daffdd4

Please sign in to comment.