| 54 | |
| 55 | |
| 56 | RETCODE adfInstallBootBlock(struct Volume *vol, uint8_t* code) |
| 57 | { |
| 58 | int i; |
| 59 | struct bBootBlock boot; |
| 60 | |
| 61 | if (vol->dev->devType!=DEVTYPE_FLOPDD && vol->dev->devType!=DEVTYPE_FLOPHD) |
| 62 | return RC_ERROR; |
| 63 | |
| 64 | if (adfReadBootBlock(vol, &boot)!=RC_OK) |
| 65 | return RC_ERROR; |
| 66 | |
| 67 | boot.rootBlock = 880; |
| 68 | for(i=0; i<1024-12; i++) /* bootcode */ |
| 69 | boot.data[i] = code[i+12]; |
| 70 | |
| 71 | if (adfWriteBootBlock(vol, &boot)!=RC_OK) |
| 72 | return RC_ERROR; |
| 73 | |
| 74 | vol->bootCode = TRUE; |
| 75 | |
| 76 | return RC_OK; |
| 77 | } |
| 78 | |
| 79 | |
| 80 | /* |
nothing calls this directly
no test coverage detected