1197518Sbz/*- 2197518Sbz * Copyright (c) 2009 "Bjoern A. Zeeb" <bz@FreeBSD.org> 3197518Sbz * All rights reserved. 4197518Sbz * 5197518Sbz * Redistribution and use in source and binary forms, with or without 6197518Sbz * modification, are permitted provided that the following conditions 7197518Sbz * are met: 8197518Sbz * 1. Redistributions of source code must retain the above copyright 9197518Sbz * notice, this list of conditions and the following disclaimer. 10197518Sbz * 2. Redistributions in binary form must reproduce the above copyright 11197518Sbz * notice, this list of conditions and the following disclaimer in the 12197518Sbz * documentation and/or other materials provided with the distribution. 13197518Sbz * 14197518Sbz * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15197518Sbz * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16197518Sbz * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17197518Sbz * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18197518Sbz * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19197518Sbz * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20197518Sbz * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21197518Sbz * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22197518Sbz * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23197518Sbz * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24197518Sbz * SUCH DAMAGE. 25197518Sbz */ 26197518Sbz 27197518Sbz/* 28197518Sbz * "lindev" is supposed to be a collection of linux-specific devices 29197518Sbz * that we also support, just not by default. 30197518Sbz * While currently there is only "/dev/full", we are planning to see 31197518Sbz * more in the future. 32197518Sbz * This file is only the container to load/unload all supported devices; 33197518Sbz * the implementation of each should go into its own file. 34197518Sbz */ 35197518Sbz 36197518Sbz#include <sys/cdefs.h> 37197518Sbz__FBSDID("$FreeBSD$"); 38197518Sbz 39197518Sbz#include <sys/param.h> 40197518Sbz#include <sys/conf.h> 41197518Sbz#include <sys/kernel.h> 42197518Sbz#include <sys/module.h> 43197518Sbz 44197518Sbz#include <dev/lindev/lindev.h> 45197518Sbz 46197518Sbz/* ARGSUSED */ 47197518Sbzstatic int 48197518Sbzlindev_modevent(module_t mod, int type, void *data) 49197518Sbz{ 50197518Sbz int error; 51197518Sbz 52197518Sbz switch(type) { 53197518Sbz case MOD_LOAD: 54197518Sbz error = lindev_modevent_full(mod, type, data); 55197518Sbz break; 56197518Sbz 57197518Sbz case MOD_UNLOAD: 58197518Sbz error = lindev_modevent_full(mod, type, data); 59197518Sbz break; 60197518Sbz 61197518Sbz case MOD_SHUTDOWN: 62197518Sbz error = lindev_modevent_full(mod, type, data); 63197518Sbz break; 64197518Sbz 65197518Sbz default: 66197518Sbz return (EOPNOTSUPP); 67197518Sbz } 68197518Sbz 69197518Sbz return (error); 70197518Sbz} 71197518Sbz 72197518SbzDEV_MODULE(lindev, lindev_modevent, NULL); 73197518SbzMODULE_VERSION(lindev, 1); 74