From owner-svn-src-head@FreeBSD.ORG Thu Jan 9 15:34:23 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C926AFE7; Thu, 9 Jan 2014 15:34:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B600D10E4; Thu, 9 Jan 2014 15:34:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s09FYNGH096796; Thu, 9 Jan 2014 15:34:23 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s09FYNQO096795; Thu, 9 Jan 2014 15:34:23 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201401091534.s09FYNQO096795@svn.freebsd.org> From: Baptiste Daroussin Date: Thu, 9 Jan 2014 15:34:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260483 - head/sbin/kldload X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jan 2014 15:34:23 -0000 Author: bapt Date: Thu Jan 9 15:34:23 2014 New Revision: 260483 URL: http://svnweb.freebsd.org/changeset/base/260483 Log: Import error message shown to the user when trying to load a module that is already loaded or compiled withing the kernel MFC after: 1 week Modified: head/sbin/kldload/kldload.c Modified: head/sbin/kldload/kldload.c ============================================================================== --- head/sbin/kldload/kldload.c Thu Jan 9 15:31:44 2014 (r260482) +++ head/sbin/kldload/kldload.c Thu Jan 9 15:34:23 2014 (r260483) @@ -181,8 +181,14 @@ main(int argc, char** argv) printf("%s is already " "loaded\n", argv[0]); } else { - warn("can't load %s", argv[0]); - errors++; + if (errno == EEXIST) { + warnx("can't load %s: module " + "already loaded or " + "in kernel", argv[0]); + } else { + warn("can't load %s", argv[0]); + errors++; + } } } else { if (verbose)