Deleted Added
full compact
spkr.c (187683) spkr.c (194990)
1/*-
2 * spkr.c -- device driver for console speaker
3 *
4 * v1.4 by Eric S. Raymond (esr@snark.thyrsus.com) Aug 1993
5 * modified for FreeBSD by Andrew A. Chernov <ache@astral.msk.su>
6 * modified for PC98 by Kakefuda
7 */
8
9#include <sys/cdefs.h>
1/*-
2 * spkr.c -- device driver for console speaker
3 *
4 * v1.4 by Eric S. Raymond (esr@snark.thyrsus.com) Aug 1993
5 * modified for FreeBSD by Andrew A. Chernov <ache@astral.msk.su>
6 * modified for PC98 by Kakefuda
7 */
8
9#include <sys/cdefs.h>
10__FBSDID("$FreeBSD: head/sys/dev/speaker/spkr.c 187683 2009-01-25 09:20:59Z ed $");
10__FBSDID("$FreeBSD: head/sys/dev/speaker/spkr.c 194990 2009-06-25 18:46:30Z kib $");
11
12#include <sys/param.h>
13#include <sys/systm.h>
14#include <sys/kernel.h>
15#include <sys/module.h>
16#include <sys/uio.h>
17#include <sys/conf.h>
18#include <sys/ctype.h>

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

434
435static int
436spkrwrite(dev, uio, ioflag)
437 struct cdev *dev;
438 struct uio *uio;
439 int ioflag;
440{
441#ifdef DEBUG
11
12#include <sys/param.h>
13#include <sys/systm.h>
14#include <sys/kernel.h>
15#include <sys/module.h>
16#include <sys/uio.h>
17#include <sys/conf.h>
18#include <sys/ctype.h>

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

434
435static int
436spkrwrite(dev, uio, ioflag)
437 struct cdev *dev;
438 struct uio *uio;
439 int ioflag;
440{
441#ifdef DEBUG
442 printf("spkrwrite: entering with dev = %s, count = %d\n",
442 printf("spkrwrite: entering with dev = %s, count = %zd\n",
443 devtoname(dev), uio->uio_resid);
444#endif /* DEBUG */
445
446 if (uio->uio_resid > (DEV_BSIZE - 1)) /* prevent system crashes */
447 return(E2BIG);
448 else {
449 unsigned n;
450 char *cp;

--- 101 unchanged lines hidden ---
443 devtoname(dev), uio->uio_resid);
444#endif /* DEBUG */
445
446 if (uio->uio_resid > (DEV_BSIZE - 1)) /* prevent system crashes */
447 return(E2BIG);
448 else {
449 unsigned n;
450 char *cp;

--- 101 unchanged lines hidden ---