git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
feat: (devfs) a new filesystem for device exposure.
[lunaix-os.git]
/
lunaix-os
/
kernel
/
block.c
diff --git
a/lunaix-os/kernel/block.c
b/lunaix-os/kernel/block.c
index d88017da73198d73a9be3a49035c73c4521dad59..b855910ffc18fc12a1506e105540dda74fc62964 100644
(file)
--- a/
lunaix-os/kernel/block.c
+++ b/
lunaix-os/kernel/block.c
@@
-39,10
+39,7
@@
block_init()
}
int
}
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;
{
int errno;
struct block_dev* bdev = (struct block_dev*)dev->underlay;
@@
-72,10
+69,7
@@
error:
}
int
}
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;
{
int errno;
struct block_dev* bdev = (struct block_dev*)dev->underlay;
@@
-134,7
+128,7
@@
__block_register(struct block_dev* bdev)
return 0;
}
return 0;
}
- struct device* dev = device_add(NULL, bdev, "sd%c", 'a' + free_slot);
+ struct device* dev = device_add
vol
(NULL, bdev, "sd%c", 'a' + free_slot);
dev->write = __block_write;
dev->read = __block_read;
dev->write = __block_write;
dev->read = __block_read;