git: 7af3fd0993a4 - main - null.c: fix signature mismatch for null_read
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 18 Oct 2026 02:29:44 UTC
The branch main has been updated by aokblast:
URL: https://cgit.FreeBSD.org/src/commit/?id=7af3fd0993a49cce7a749dfb62e9b17ca3a6be1f
commit 7af3fd0993a49cce7a749dfb62e9b17ca3a6be1f
Author: ShengYi Hung <aokblast@FreeBSD.org>
AuthorDate: 2025-02-28 14:56:45 +0000
Commit: ShengYi Hung <aokblast@FreeBSD.org>
CommitDate: 2026-10-18 02:29:41 +0000
null.c: fix signature mismatch for null_read
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D49168
---
sys/dev/null/null.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/sys/dev/null/null.c b/sys/dev/null/null.c
index b5725de30bef..02706dade839 100644
--- a/sys/dev/null/null.c
+++ b/sys/dev/null/null.c
@@ -50,6 +50,7 @@ static struct cdev *full_dev;
static struct cdev *null_dev;
static struct cdev *zero_dev;
+static d_read_t null_read;
static d_write_t full_write;
static d_write_t null_write;
static d_ioctl_t null_ioctl;
@@ -82,7 +83,7 @@ static struct cdevsw full_cdevsw = {
static struct cdevsw null_cdevsw = {
.d_version = D_VERSION,
- .d_read = (d_read_t *)nullop,
+ .d_read = null_read,
.d_write = null_write,
.d_ioctl = null_ioctl,
.d_kqfilter = kqfilter,
@@ -99,6 +100,13 @@ static struct cdevsw zero_cdevsw = {
.d_flags = D_MMAP_ANON,
};
+static int
+null_read(struct cdev *dev __unused, struct uio *uio __unused,
+ int flags __unused)
+{
+ return (0);
+}
+
/* ARGSUSED */
static int
full_write(struct cdev *dev __unused, struct uio *uio __unused, int flags __unused)