From owner-freebsd-doc@FreeBSD.ORG Tue Jul 15 14:40:04 2008 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF291106566B for ; Tue, 15 Jul 2008 14:40:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8DF658FC21 for ; Tue, 15 Jul 2008 14:40:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m6FEe498098562 for ; Tue, 15 Jul 2008 14:40:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m6FEe4FV098561; Tue, 15 Jul 2008 14:40:04 GMT (envelope-from gnats) Resent-Date: Tue, 15 Jul 2008 14:40:04 GMT Resent-Message-Id: <200807151440.m6FEe4FV098561@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Mateusz Guzik Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9817A1065693 for ; Tue, 15 Jul 2008 14:38:01 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 77C888FC1A for ; Tue, 15 Jul 2008 14:38:01 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m6FEc1Jg071949 for ; Tue, 15 Jul 2008 14:38:01 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m6FEc1XC071948; Tue, 15 Jul 2008 14:38:01 GMT (envelope-from nobody) Message-Id: <200807151438.m6FEc1XC071948@www.freebsd.org> Date: Tue, 15 Jul 2008 14:38:01 GMT From: Mateusz Guzik To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: docs/125639: [patch] kldunloadf(2) does not mention about possible error EINVAL X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2008 14:40:04 -0000 >Number: 125639 >Category: docs >Synopsis: [patch] kldunloadf(2) does not mention about possible error EINVAL >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Tue Jul 15 14:40:04 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Mateusz Guzik >Release: 8.0-CURRENT >Organization: >Environment: FreeBSD eternal 8.0-CURRENT FreeBSD 8.0-CURRENT #18: Tue Jul 15 15:35:46 CEST 2008 f@eternal:/usr/obj/usr/src/sys/ETERNAL i386 >Description: Function kldunloadf performs the following check before calling kern_kldunload: if (uap->flags != LINKER_UNLOAD_NORMAL && uap->flags != LINKER_UNLOAD_FORCE) return (EINVAL); But this return value is not documented. >How-To-Repeat: >Fix: Patch attached with submission follows: --- lib/libc/sys/kldunload.2.orig 2008-07-15 03:11:29.000000000 +0200 +++ lib/libc/sys/kldunload.2 2008-07-15 03:21:15.000000000 +0200 @@ -67,10 +67,13 @@ You do not have access to unlink the file from the kernel. .It Bq Er ENOENT The file was not found. .It Bq Er EBUSY You attempted to unload a file linked by the kernel. +.It Bq Er EINVAL +.Fn kldunloadf +was called with invalid flags. .El .Sh SEE ALSO .Xr kldfind 2 , .Xr kldfirstmod 2 , .Xr kldload 2 , >Release-Note: >Audit-Trail: >Unformatted: