X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/d8d001a6664b88b66524989589fcd809de6d3a92..e5c3c8accffbcd77fea12ccf2b0accc70c645aaa:/lunaix-os/kernel/block.c diff --git a/lunaix-os/kernel/block.c b/lunaix-os/kernel/block.c index d88017d..b855910 100644 --- a/lunaix-os/kernel/block.c +++ b/lunaix-os/kernel/block.c @@ -39,10 +39,7 @@ block_init() } int -__block_read(struct device* dev, - void* buf, - unsigned int offset, - unsigned int len) +__block_read(struct device* dev, void* buf, size_t offset, size_t len) { int errno; struct block_dev* bdev = (struct block_dev*)dev->underlay; @@ -72,10 +69,7 @@ error: } int -__block_write(struct device* dev, - void* buf, - unsigned int offset, - unsigned int len) +__block_write(struct device* dev, void* buf, size_t offset, size_t len) { int errno; struct block_dev* bdev = (struct block_dev*)dev->underlay; @@ -134,7 +128,7 @@ __block_register(struct block_dev* bdev) return 0; } - struct device* dev = device_add(NULL, bdev, "sd%c", 'a' + free_slot); + struct device* dev = device_addvol(NULL, bdev, "sd%c", 'a' + free_slot); dev->write = __block_write; dev->read = __block_read;