lindev(4): remove the device

lindev(4) was only used to provide /dev/full which is now a standard feature of
FreeBSD.  /dev/full was never linux-specific and provides a generally useful
feature.

Document this in UPDATING and bump __FreeBSD_version.  This will be documented
in the PH shortly.

Reported by:	jkim
This commit is contained in:
Eitan Adler 2014-05-02 05:30:49 +00:00
parent b100acf254
commit 461dbce2d9
6 changed files with 5 additions and 286 deletions

View File

@ -31,6 +31,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW:
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
20140430:
The lindev device has been removed since /dev/full has been made a
standard device. __FreeBSD_version has been bumped.
20140418:
The YES_HESIOD knob has been removed. It has been obsolete for
a decade. Please move to using WITH_HESIOD instead or your builds

View File

@ -142,6 +142,7 @@ MAN= aac.4 \
filemon.4 \
firewire.4 \
fpa.4 \
full.4 \
fwe.4 \
fwip.4 \
fwohci.4 \
@ -226,7 +227,6 @@ MAN= aac.4 \
le.4 \
led.4 \
lge.4 \
${_lindev.4} \
${_linux.4} \
lmc.4 \
lo.4 \
@ -790,7 +790,6 @@ _if_vxge.4= if_vxge.4
_if_wpi.4= if_wpi.4
_ipmi.4= ipmi.4
_io.4= io.4
_lindev.4= lindev.4
_linux.4= linux.4
_ndis.4= ndis.4
_nfe.4= nfe.4
@ -819,7 +818,6 @@ _wpi.4= wpi.4
_xen.4= xen.4
_xnb.4= xnb.4
MLINKS+=lindev.4 full.4
.endif
.if ${MACHINE_CPUARCH} == "amd64"

View File

@ -1,73 +0,0 @@
.\"-
.\" Copyright (c) 2009 "Bjoern A. Zeeb" <bz@FreeBSD.org>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd September 26, 2009
.Dt LINDEV 4
.Os
.Sh NAME
.Nm lindev
.Nd Linux-specific pseudo devices support
.Sh SYNOPSIS
To compile this collection of linux-specific pseudo devices into the kernel,
place the following line in your kernel configuration file:
.Bd -ragged -offset indent
.Cd "device lindev"
.Ed
.Pp
Alternatively, to load the driver as a module at boot time,
place the following line in
.Xr loader.conf 5 :
.Bd -literal -offset indent
lindev_load="YES"
.Ed
.Sh DESCRIPTION
The
.Nm
module provides a collection of linux-specific pseudo devices.
.Sh DEVICES
.Bl -tag -width /dev/full
.It Pa /dev/full
The
.Xr full
device always returns
.Er ENOSPC
on write attempts.
For reads it emulates
.Xr zero 4 .
.El
.Sh FILES
.Bl -tag -width /dev/full
.It Pa /dev/full
.El
.Sh SEE ALSO
.Xr null 4 ,
.Xr zero 4
.Sh HISTORY
The
.Nm
module first appeared in
.Fx 8.1 .

View File

@ -1,103 +0,0 @@
/*-
* Copyright (c) 2009 Ed Schouten <ed@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/conf.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/module.h>
#include <sys/systm.h>
#include <sys/uio.h>
#include <dev/lindev/lindev.h>
static struct cdev *full_dev;
static d_read_t full_read;
static d_write_t full_write;
static struct cdevsw full_cdevsw = {
.d_version = D_VERSION,
.d_read = full_read,
.d_write = full_write,
.d_name = "full",
};
static void *zbuf;
/* ARGSUSED */
static int
full_read(struct cdev *dev __unused, struct uio *uio, int flags __unused)
{
int error = 0;
while (uio->uio_resid > 0 && error == 0)
error = uiomove(zbuf, MIN(uio->uio_resid, PAGE_SIZE), uio);
return (error);
}
/* ARGSUSED */
static int
full_write(struct cdev *dev __unused, struct uio *uio __unused,
int flags __unused)
{
return (ENOSPC);
}
/* ARGSUSED */
int
lindev_modevent_full(module_t mod __unused, int type, void *data __unused)
{
switch(type) {
case MOD_LOAD:
zbuf = (void *)malloc(PAGE_SIZE, M_TEMP, M_WAITOK | M_ZERO);
full_dev = make_dev(&full_cdevsw, 0, UID_ROOT, GID_WHEEL,
0666, "full");
if (bootverbose)
printf("full: <full device>\n");
break;
case MOD_UNLOAD:
destroy_dev(full_dev);
free(zbuf, M_TEMP);
break;
case MOD_SHUTDOWN:
break;
default:
return (EOPNOTSUPP);
}
return (0);
}

View File

@ -1,73 +0,0 @@
/*-
* Copyright (c) 2009 "Bjoern A. Zeeb" <bz@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* "lindev" is supposed to be a collection of linux-specific devices
* that we also support, just not by default.
* While currently there is only "/dev/full", we are planning to see
* more in the future.
* This file is only the container to load/unload all supported devices;
* the implementation of each should go into its own file.
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/conf.h>
#include <sys/kernel.h>
#include <sys/module.h>
#include <dev/lindev/lindev.h>
/* ARGSUSED */
static int
lindev_modevent(module_t mod, int type, void *data)
{
int error;
switch(type) {
case MOD_LOAD:
error = lindev_modevent_full(mod, type, data);
break;
case MOD_UNLOAD:
error = lindev_modevent_full(mod, type, data);
break;
case MOD_SHUTDOWN:
error = lindev_modevent_full(mod, type, data);
break;
default:
return (EOPNOTSUPP);
}
return (error);
}
DEV_MODULE(lindev, lindev_modevent, NULL);
MODULE_VERSION(lindev, 1);

View File

@ -1,34 +0,0 @@
/*-
* Copyright (c) 2009 "Bjoern A. Zeeb" <bz@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD$
*/
#ifndef _DEV_LINDEV_LINDEV_H
#define _DEV_LINDEV_LINDEV_H
int lindev_modevent_full(module_t, int, void *);
#endif /* _DEV_LINDEV_LINDEV_H */