From f495cc1e93710c233292a503720ec235a61b685c Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 18 Mar 2020 17:32:50 +0100 Subject: Applied official linux kernel code style guidelines Due to my change to vim and the clang-format plugin this was needed! --- src/kernel/fs/atapi_pio.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src/kernel/fs/atapi_pio.c') diff --git a/src/kernel/fs/atapi_pio.c b/src/kernel/fs/atapi_pio.c index 39f32b6..6f0e3a6 100644 --- a/src/kernel/fs/atapi_pio.c +++ b/src/kernel/fs/atapi_pio.c @@ -4,29 +4,29 @@ void ATAPI_read(uint16_t nblocks, uint32_t lba) { - struct dapack *d = (struct dapack *) ATAPI_PIO_DAPACK; - d->size = 0x10; - d->null = 0x00; - d->blk_count = nblocks; - d->b_offset = ATAPI_PIO_BUFFER; - d->b_segment = 0x0000; - d->start = lba; - d->upper_lba_bits = 0x00000000; + struct dapack *d = (struct dapack *)ATAPI_PIO_DAPACK; + d->size = 0x10; + d->null = 0x00; + d->blk_count = nblocks; + d->b_offset = ATAPI_PIO_BUFFER; + d->b_segment = 0x0000; + d->start = lba; + d->upper_lba_bits = 0x00000000; - regs16_t regs; - regs.ax = 0x4200; - regs.dx = ATAPI_PIO_DRIVE; - regs.ds = 0; - regs.si = ATAPI_PIO_DAPACK; + regs16_t regs; + regs.ax = 0x4200; + regs.dx = ATAPI_PIO_DRIVE; + regs.ds = 0; + regs.si = ATAPI_PIO_DAPACK; - v86(LBA_READ_INT, ®s); + v86(LBA_READ_INT, ®s); } void ATAPI_granular_read(uint32_t nblocks, uint32_t lba, uint8_t *output) { - for (uint32_t i = 0; i < nblocks; i++) { - ATAPI_read(1, lba + i); - for (uint16_t j = 0; j < ATAPI_SECTOR_SIZE; j++) - output[j + (2048 * i)] = ((uint8_t *) ATAPI_PIO_BUFFER)[j]; - } + for (uint32_t i = 0; i < nblocks; i++) { + ATAPI_read(1, lba + i); + for (uint16_t j = 0; j < ATAPI_SECTOR_SIZE; j++) + output[j + (2048 * i)] = ((uint8_t *)ATAPI_PIO_BUFFER)[j]; + } } \ No newline at end of file -- cgit v1.2.3