aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/devfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/devfs.c')
-rw-r--r--sys/fs/devfs.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/fs/devfs.c b/sys/fs/devfs.c
index e320973..81c2a43 100644
--- a/sys/fs/devfs.c
+++ b/sys/fs/devfs.c
@@ -55,6 +55,14 @@ cdevsw_read(void *devsw, dev_t dev, struct sio_txn *sio)
return cdevsw->read(dev, sio, 0);
}
+static inline int
+bdevsw_read(void *devsw, dev_t dev, struct sio_txn *sio)
+{
+ struct bdevsw *bdevsw = devsw;
+
+ return bdevsw->read(dev, sio, 0);
+}
+
/*
* Get a devfs node by name.
*
@@ -134,8 +142,8 @@ devfs_read(struct vnode *vp, struct sio_txn *sio)
if (!dnp->is_block)
return cdevsw_read(devsw, dnp->dev, sio);
- /* TODO: Block devices */
- return -EIO;
+ /* Block device */
+ return bdevsw_read(devsw, dnp->dev, sio);
}
static int