Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Apr 1995 19:19:37 -0500 (CDT)
From:      Mike Pritchard <mpp@mpp.com>
To:        bugs@FreeBSD.org
Subject:   kern/subr_log.c ioctl bug
Message-ID:  <199504290019.TAA00763@mpp.com>

next in thread | raw e-mail | index | archive | help
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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199504290019.TAA00763>