block: make write buf const
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
171ea49050
commit
be701fdd0b
3 changed files with 6 additions and 6 deletions
|
|
@ -38,7 +38,7 @@ struct block_device {
|
||||||
};
|
};
|
||||||
|
|
||||||
ssize_t block_read(struct block_device *dev, char *buf, size_t offset, size_t n_blocks);
|
ssize_t block_read(struct block_device *dev, char *buf, size_t offset, size_t n_blocks);
|
||||||
ssize_t block_write(struct block_device *dev, char *buf, size_t offset, size_t n_blocks);
|
ssize_t block_write(struct block_device *dev, const char *buf, size_t offset, size_t n_blocks);
|
||||||
|
|
||||||
int block_check_partitions(struct block_device *bdev);
|
int block_check_partitions(struct block_device *bdev);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,6 @@
|
||||||
|
|
||||||
#include <kernel/types.h>
|
#include <kernel/types.h>
|
||||||
|
|
||||||
void cache_flush_range(void *addr, size_t len);
|
void cache_flush_range(const void *addr, size_t len);
|
||||||
|
|
||||||
#endif /* _CACHE_H */
|
#endif /* _CACHE_H */
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ ssize_t block_read(struct block_device *dev, char *buf, size_t offset, size_t n_
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ssize_t block_write(struct block_device *dev, char *buf, size_t offset, size_t n_blocks)
|
ssize_t block_write(struct block_device *dev, const char *buf, size_t offset, size_t n_blocks)
|
||||||
{
|
{
|
||||||
while (dev->part_of) {
|
while (dev->part_of) {
|
||||||
offset += dev->lba_start;
|
offset += dev->lba_start;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue