Skip to content

Commit

Permalink
Merge pull request #41 from jamarju/master
Browse files Browse the repository at this point in the history
floppy: Obey FAT read-only attribute
  • Loading branch information
keirf authored Dec 27, 2017
2 parents 4966407 + 77e94a0 commit 09e5b85
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/floppy.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,8 +668,13 @@ bool_t floppy_handle(void)
image_open(image, drv->slot);
drv->image = image;
dma_rd->state = DMA_stopping;
if (image->handler->write_track)
drive_change_output(drv, outp_wrprot, FALSE);
if (! (drv->slot->attributes & AM_RDO))
if (image->handler->write_track)
drive_change_output(drv, outp_wrprot, FALSE);
else
printk("Image is R/O (no write handler)\n");
else
printk("Image is R/O (attrib)\n");
}

switch (dma_wr->state) {
Expand Down

0 comments on commit 09e5b85

Please sign in to comment.