Makefile cleaup
[thunix.git] / fs / tfs / tfs_diskio.c
blob8599c3608a393719a6219097379f7f91c8ee5645
1 #include <stdio.h>
2 #include <tfs.h>
3 #include <fd.h>
5 void tfs_bread(struct tfs_sb_info *sbi, uint32_t block, void *buf)
7 uint32_t sector = (block << (sbi->s_block_shift - 9)) + sbi->s_offset + TFS_FS_SECTOR;
9 floppy_reads(sector, buf, 1 << (sbi->s_block_shift - 9));
12 void tfs_bwrite(struct tfs_sb_info *sbi, uint32_t block, void *buf)
14 uint32_t sector = (block << (sbi->s_block_shift - 9)) + sbi->s_offset + TFS_FS_SECTOR;
16 floppy_writes(sector, buf, 1 << (sbi->s_block_shift - 9));