diff options
author | jkh <jkh@FreeBSD.org> | 1995-05-07 19:45:49 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1995-05-07 19:45:49 +0000 |
commit | b603376486af3684e8f27584d62f50d7aa85c94f (patch) | |
tree | b5e17515d4af09b4d50835d0522ba244678da8ca | |
parent | 18ae543a89777cbefe32e0e9fe03e395b28dfb23 (diff) | |
download | FreeBSD-src-b603376486af3684e8f27584d62f50d7aa85c94f.zip FreeBSD-src-b603376486af3684e8f27584d62f50d7aa85c94f.tar.gz |
Add additional check for IRQ > 15. This code still needs a lot of work!
Remove silly "Naffy, the Wonder Porpoise" attribution and add more
justifiable (and overdue) attribution to Bruce Evans. Look at it
as a delete and add operation batched together, not a substitution. :-)
-rw-r--r-- | sys/i386/i386/userconfig.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/i386/i386/userconfig.c b/sys/i386/i386/userconfig.c index ada8ea7..6af4a1f 100644 --- a/sys/i386/i386/userconfig.c +++ b/sys/i386/i386/userconfig.c @@ -6,9 +6,11 @@ * Copyright (c) 1994 David Greenman * All rights reserved. * + * Many additional changes by Bruce Evans + * * This code is derived from software contributed by the * University of California Berkeley, Jordan K. Hubbard, - * David Greenman and Naffy, the Wonder Porpoise. + * David Greenman and Bruce Evans. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -38,7 +40,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: userconfig.c,v 1.24 1995/05/07 18:23:58 jkh Exp $ + * $Id: userconfig.c,v 1.25 1995/05/07 18:24:43 jkh Exp $ */ #include <sys/param.h> @@ -291,6 +293,10 @@ set_device_irq(CmdParm *parms) printf("Warning: Remapping IRQ 2 to IRQ 9 - see config(8)\n"); irq = 9; } + else if (irq > 15) { + printf("An IRQ > 15 would be invalid.\n"); + return 0; + } parms[0].parm.dparm->id_irq = (irq < 16 ? 1 << irq : 0); save_dev(parms[0].parm.dparm); return 0; |