From owner-freebsd-bugs Fri Apr 28 17:20:36 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id RAA29782 for bugs-outgoing; Fri, 28 Apr 1995 17:20:36 -0700 Received: from mpp.com (dialup-2-143.gw.umn.edu [134.84.101.143]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id RAA29776 for ; Fri, 28 Apr 1995 17:20:31 -0700 Received: (from mpp@localhost) by mpp.com (8.6.11/8.6.9) id TAA00763 for bugs@freebsd.org; Fri, 28 Apr 1995 19:19:38 -0500 From: Mike Pritchard Message-Id: <199504290019.TAA00763@mpp.com> Subject: kern/subr_log.c ioctl bug To: bugs@FreeBSD.org Date: Fri, 28 Apr 1995 19:19:37 -0500 (CDT) X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 705 Sender: bugs-owner@FreeBSD.org Precedence: bulk Could someone apply the following patch to sys/kern/subr_log.c? It fixes the ioctl routine to not chew up massive amounts of kernel time if an invalid ioctl is done on /dev/klog. logioctl() needs to return an errno instead of -1 on a failed ioctl. Discovered while adapting this code for my screen print routines. *** orig/subr_log.c Fri Apr 28 19:12:24 1995 --- subr_log.c Fri Apr 28 19:12:43 1995 *************** *** 234,240 **** break; default: ! return (-1); } return (0); } --- 234,240 ---- break; default: ! return (EINVAL); } return (0); } -- Mike Pritchard pritc003@maroon.tc.umn.edu "Go that way. Really fast. If something gets in your way, turn"