Deleted Added
full compact
make_pseudo_driver.sh (50476) make_pseudo_driver.sh (76175)
1#!/bin/sh
2# This writes a skeleton driver and puts it into the kernel tree for you
3#arg1 is lowercase "foo"
4#
5# Trust me, RUN THIS SCRIPT :)
6#
7#-------cut here------------------
8cd /sys/i386/conf

--- 7 unchanged lines hidden (view full) ---

16UPPER=`echo ${1} |tr "[:lower:]" "[:upper:]"`
17cat >files.${UPPER} <<DONE
18dev/${1}.c optional ${1} device-driver
19DONE
20
21cat >${UPPER} <<DONE
22# Configuration file for kernel type: ${UPPER}
23ident ${UPPER}
1#!/bin/sh
2# This writes a skeleton driver and puts it into the kernel tree for you
3#arg1 is lowercase "foo"
4#
5# Trust me, RUN THIS SCRIPT :)
6#
7#-------cut here------------------
8cd /sys/i386/conf

--- 7 unchanged lines hidden (view full) ---

16UPPER=`echo ${1} |tr "[:lower:]" "[:upper:]"`
17cat >files.${UPPER} <<DONE
18dev/${1}.c optional ${1} device-driver
19DONE
20
21cat >${UPPER} <<DONE
22# Configuration file for kernel type: ${UPPER}
23ident ${UPPER}
24# \$FreeBSD: head/share/examples/drivers/make_pseudo_driver.sh 50476 1999-08-28 00:22:10Z peter $"
24# \$FreeBSD: head/share/examples/drivers/make_pseudo_driver.sh 76175 2001-05-01 09:15:30Z schweikh $"
25DONE
26
27grep -v GENERIC < GENERIC >>${UPPER}
28
29cat >>${UPPER} <<DONE
30# trust me, you'll need this
31options DDB
25DONE
26
27grep -v GENERIC < GENERIC >>${UPPER}
28
29cat >>${UPPER} <<DONE
30# trust me, you'll need this
31options DDB
32pseudo-device ${1} 4 # might as well allow 4 of them
32device ${1} 4 # might as well allow 4 of them
33DONE
34
35cat >../../dev/${1}.c <<DONE
36/*
37 * Copyright ME
38 *
39 * ${1} driver
33DONE
34
35cat >../../dev/${1}.c <<DONE
36/*
37 * Copyright ME
38 *
39 * ${1} driver
40 * \$FreeBSD: head/share/examples/drivers/make_pseudo_driver.sh 50476 1999-08-28 00:22:10Z peter $
40 * \$FreeBSD: head/share/examples/drivers/make_pseudo_driver.sh 76175 2001-05-01 09:15:30Z schweikh $
41 */
42
43
44#include "${1}.h" /* generated file.. defines N${UPPER} */
45#include <sys/param.h>
46#include <sys/systm.h>
47#include <sys/kernel.h> /* SYSINIT stuff */
48#include <sys/conf.h> /* cdevsw stuff */

--- 273 unchanged lines hidden ---
41 */
42
43
44#include "${1}.h" /* generated file.. defines N${UPPER} */
45#include <sys/param.h>
46#include <sys/systm.h>
47#include <sys/kernel.h> /* SYSINIT stuff */
48#include <sys/conf.h> /* cdevsw stuff */

--- 273 unchanged lines hidden ---