LinuxKPI: Finalize move of lindebugfs from ports to base.
The source file was moved to base earlier and also improved upon, but never compiled in. This patch will: - Make a module in sys/modules - Make lindebugfs depend on linuxkpi (for seq_file) - Check if read/write functions are set before calling, DRM drivers don't always set both of them. Reviewed by: hps Approved by: imp (mentor), hps MFC after: 1 week
This commit is contained in:
parent
8b9a164441
commit
80233392cc
@ -143,10 +143,17 @@ debugfs_fill(PFS_FILL_ARGS)
|
||||
}
|
||||
sf = lf.private_data;
|
||||
sf->buf = sb;
|
||||
if (uio->uio_rw == UIO_READ)
|
||||
rc = d->dm_fops->read(&lf, NULL, len, &off);
|
||||
else
|
||||
rc = d->dm_fops->write(&lf, buf, len, &off);
|
||||
if (uio->uio_rw == UIO_READ) {
|
||||
if (d->dm_fops->read)
|
||||
rc = d->dm_fops->read(&lf, NULL, len, &off);
|
||||
else
|
||||
rc = ENODEV;
|
||||
} else {
|
||||
if (d->dm_fops->write)
|
||||
rc = d->dm_fops->write(&lf, buf, len, &off);
|
||||
else
|
||||
rc = ENODEV;
|
||||
}
|
||||
if (d->dm_fops->release)
|
||||
d->dm_fops->release(&vn, &lf);
|
||||
else
|
||||
@ -307,3 +314,4 @@ PSEUDOFS(debugfs, 1, PR_ALLOW_MOUNT_LINSYSFS);
|
||||
#else
|
||||
PSEUDOFS(debugfs, 1, VFCF_JAIL);
|
||||
#endif
|
||||
MODULE_DEPEND(lindebugfs, linuxkpi, 1, 1, 1);
|
||||
|
@ -205,6 +205,7 @@ SUBDIR= \
|
||||
libalias \
|
||||
libiconv \
|
||||
libmchain \
|
||||
lindebugfs \
|
||||
${_linux} \
|
||||
${_linux_common} \
|
||||
${_linux64} \
|
||||
|
12
sys/modules/lindebugfs/Makefile
Normal file
12
sys/modules/lindebugfs/Makefile
Normal file
@ -0,0 +1,12 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.PATH: ${SRCTOP}/sys/compat/lindebugfs
|
||||
|
||||
KMOD= lindebugfs
|
||||
SRCS= vnode_if.h \
|
||||
device_if.h bus_if.h pci_if.h \
|
||||
lindebugfs.c
|
||||
|
||||
CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include
|
||||
|
||||
.include <bsd.kmod.mk>
|
Loading…
Reference in New Issue
Block a user