Skip to content

Commit 58ec8f2

Browse files
authored
Must set readonly *after* mount() resets the readonly flag (#994)
This reverts commit 76b76fa.
1 parent 1caa67b commit 58ec8f2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/device/iwm/fuji.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,14 +396,13 @@ uint8_t iwmFuji::iwm_ctrl_disk_image_mount() // SP CTRL command
396396
// mediatype_t mt = MediaType::discover_mediatype(disk.filename);
397397
// if (mt == mediatype_t::MEDIATYPE_PO)
398398
// { // And now mount it
399+
disk.disk_type = disk_dev->mount(disk.fileh, disk.filename, disk.disk_size);
399400

400401
if (options == DISK_ACCESS_MODE_WRITE)
401402
{
402403
disk_dev->readonly = false;
403404
}
404405

405-
disk.disk_type = disk_dev->mount(disk.fileh, disk.filename, disk.disk_size);
406-
407406
return SP_ERR_NOERROR;
408407
}
409408

0 commit comments

Comments
 (0)