vfs_open parses a path and returns the correct inode. The out inode is a double pointer argument passed to vfs_open, and the return value is an error code, or 0 Signed-off-by: Michael Shaw <m@michaelsshaw.com>
14 lines
361 B
C
14 lines
361 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
#include <kernel/common.h>
|
|
|
|
#include <drivers/block.h>
|
|
|
|
ssize_t block_read(struct block_device *dev, char *buf, size_t offset, size_t n)
|
|
{
|
|
return dev->ops.read(dev, buf, offset, n);
|
|
}
|
|
|
|
ssize_t block_write(struct block_device *dev, char *buf, size_t offset, size_t n)
|
|
{
|
|
return dev->ops.write(dev, buf, offset, n);
|
|
}
|