Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tinyusb/msc_fat_view: Fix directory population condition #3123

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions hw/usb/tinyusb/msc_fat_view/src/msc_fat_view.c
Original file line number Diff line number Diff line change
Expand Up @@ -1630,9 +1630,9 @@ tud_msc_inquiry_cb(uint8_t lun, uint8_t vendor_id[8], uint8_t product_id[16], ui
bool
tud_msc_test_unit_ready_cb(uint8_t lun)
{
bool ret = medium_state >= MEDIUM_RELOAD;
bool ret = medium_state == MEDIUM_PRESENT;

if (medium_state == MEDIUM_RELOAD && last_scsi_command == SCSI_CMD_TEST_UNIT_READY) {
if (medium_state == MEDIUM_RELOAD) {
/* This path will report medium not present */
medium_state = REPORT_MEDIUM_CHANGE;
init_disk_data();
Expand Down