From owner-svn-src-head@freebsd.org Tue Sep 3 14:06:32 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 770A7DC96B; Tue, 3 Sep 2019 14:06:27 +0000 (UTC) (envelope-from yuripv@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46N7zR1mfNz4PYg; Tue, 3 Sep 2019 14:06:27 +0000 (UTC) (envelope-from yuripv@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1452) id 2110B1A69E; Tue, 3 Sep 2019 14:06:08 +0000 (UTC) X-Original-To: yuripv@localmail.freebsd.org Delivered-To: yuripv@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id 5530B1C782; Sun, 7 Apr 2019 21:15:01 +0000 (UTC) (envelope-from owner-src-committers@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2174172F86; Sun, 7 Apr 2019 21:15:01 +0000 (UTC) (envelope-from owner-src-committers@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 538) id 0F7071C781; Sun, 7 Apr 2019 21:15:01 +0000 (UTC) Delivered-To: src-committers@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id 94D5C1C77A for ; Sun, 7 Apr 2019 21:14:58 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-yb1-xb34.google.com (mail-yb1-xb34.google.com [IPv6:2607:f8b0:4864:20::b34]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 51C8872F7B for ; Sun, 7 Apr 2019 21:14:58 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-yb1-xb34.google.com with SMTP id b18so4397389yba.12 for ; Sun, 07 Apr 2019 14:14:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=vK+jm5SNo/rtmKTQ9iWH74DwxEDZ1h3rQo2maF/0Zro=; b=i8JBmdQ2InQw9doHeHVjGNjppYI0RXsgQpHrvlSmyIZBhkjvF6V3NWIcW8qjE3IU4G iJ34uv3FUJSV3jLD17YTe3s+z2NoU+r64yaJnHeYqHFj8jKsZH522INlDnm6y9obxpKk kpaeiVNW9KKoULaq9XL/M/x7Emf3q71OtrUo6+hfBf9gPG9Wf3V5b86OgFruY7toby/A US38YxBMT8A9CwKw8gjxr5NdCYpZnaMwV5Xmir5+Dbjn+jo5+sF25W9x9HO2MBvm+Z9R KehFPIG2ekHTgOReQeflgis83HFCJt3kLD5LnpgUYrSSmycW8ErAo0Z2t8idLnljuv4x fqBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=vK+jm5SNo/rtmKTQ9iWH74DwxEDZ1h3rQo2maF/0Zro=; b=oNf4bfbAso/zNog428yIYn7sQ9GWog1fCBMQF6629MCOvm3kYMlGSmfHAtHAe9WudD jQVNY2QAdld9skUcF2KswE6Y4wLOfXNegN3PUgJSo3APYzzqT3uE+ml5MF+UY3jXXsxg YFGvI+juV8/K3B5iQx5bAwPwNB9zn7Xiltu14iAaxip4g8mO3049FD2vBqOSBLb6rltR GWKZnSKA+R94L7kDkb0vxydbnMnG2/O13yUskRFg+W5SpQDYHpoQvB1mqzYAt8r4292B cY4Op5Mb606EWn14C2kQ29vYmFGB7mfqOI+Kj595wYVTyt+lqOWOQTiRlH7p1Cc+UkzV bUrQ== X-Gm-Message-State: APjAAAWIxMJW4WD39AJXkgJJX1uJXTR49GkcTLFwcWxF9uNH8epPVe2Z cg6iJ453Ph/uVH6gxa0SMWEBIC1/n8h5susYA+dL6TPv X-Google-Smtp-Source: APXvYqxrRyXSw9+AjHYD7/UjwPKaLnOsYNBOkqpeJh6O0yYb8HlzFAqtO7b4F+LvsNCXNGR0mhZGupMN4z+KbEZKYP8= X-Received: by 2002:a25:241:: with SMTP id 62mr11706901ybc.10.1554671697487; Sun, 07 Apr 2019 14:14:57 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:810e:0:0:0:0:0 with HTTP; Sun, 7 Apr 2019 14:14:56 -0700 (PDT) In-Reply-To: <201904071831.x37IVj4r096803@repo.freebsd.org> References: <201904071831.x37IVj4r096803@repo.freebsd.org> From: Oliver Pinter Message-ID: Subject: Re: svn commit: r346017 - in head: libexec/rc libexec/rc/rc.d share/man/man5 To: Chris Rees Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Konstantin Belousov Precedence: bulk X-Loop: FreeBSD.org Sender: owner-src-committers@freebsd.org X-Rspamd-Queue-Id: 2174172F86 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] Status: O Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Tue, 03 Sep 2019 14:06:32 -0000 X-Original-Date: Sun, 7 Apr 2019 23:14:56 +0200 X-List-Received-Date: Tue, 03 Sep 2019 14:06:32 -0000 On Sunday, April 7, 2019, Chris Rees wrote: > Author: crees (doc,ports committer) > Date: Sun Apr 7 18:31:45 2019 > New Revision: 346017 > URL: https://svnweb.freebsd.org/changeset/base/346017 > > Log: > Remove now unnecessary kldstat check before attempting to load modules. > > Since r233109, kldload has the -n option, which silently ignores options > that are already loaded. > > https://lists.freebsd.org/pipermail/freebsd-rc/2018-December/003899.html > > Note that this script no longer reports if the module is already loaded, > but it could be argued this wasn't particularly useful information. > > PR: docs/234248 This is why a docs PR? > Reviewed by: bcr (docs), kib, rgrimes (visual) I haven't seen kib on the reviewers list. > Approved by: jilles > Differential Revision: https://reviews.freebsd.org/D18670 > > Modified: > head/libexec/rc/rc.d/abi > head/libexec/rc/rc.d/bthidd > head/libexec/rc/rc.d/cfumass > head/libexec/rc/rc.d/kld > head/libexec/rc/rc.d/mdconfig > head/libexec/rc/rc.d/mdconfig2 > head/libexec/rc/rc.d/mountcritremote > head/libexec/rc/rc.d/syscons > head/libexec/rc/rc.subr > head/share/man/man5/rc.conf.5 > > Modified: head/libexec/rc/rc.d/abi > ============================================================ > ================== > --- head/libexec/rc/rc.d/abi Sun Apr 7 18:24:26 2019 (r346016) > +++ head/libexec/rc/rc.d/abi Sun Apr 7 18:31:45 2019 (r346017) > @@ -27,10 +27,10 @@ linux_start() > local _tmpdir > > echo -n ' linux' > - load_kld -e 'linux(aout|elf)' linux > + load_kld linux > case `sysctl -n hw.machine_arch` in > amd64) > - load_kld -e 'linux64elf' linux64 > + load_kld linux64 > ;; > esac > if [ -x /compat/linux/sbin/ldconfigDisabled ]; then > > Modified: head/libexec/rc/rc.d/bthidd > ============================================================ > ================== > --- head/libexec/rc/rc.d/bthidd Sun Apr 7 18:24:26 2019 (r346016) > +++ head/libexec/rc/rc.d/bthidd Sun Apr 7 18:31:45 2019 (r346017) > @@ -34,11 +34,11 @@ evdev_enabled() > bthidd_prestart() > { > if evdev_enabled; then > - load_kld -m uinput uinput > + load_kld uinput > fi > - load_kld -m kbdmux kbdmux > - load_kld -m vkbd vkbd > - load_kld -m ng_btsocket ng_btsocket > + load_kld kbdmux > + load_kld vkbd > + load_kld ng_btsocket > return 0 > } > > > Modified: head/libexec/rc/rc.d/cfumass > ============================================================ > ================== > --- head/libexec/rc/rc.d/cfumass Sun Apr 7 18:24:26 2019 > (r346016) > +++ head/libexec/rc/rc.d/cfumass Sun Apr 7 18:31:45 2019 > (r346017) > @@ -75,7 +75,7 @@ cfumass_start() > return "${err}" > fi > > - load_kld -e cfumass cfumass > + load_kld cfumass > > # If the template is already switched to Mass Storage, then reset > # it to -1 to force the host to reenumerate it; otherwise it might > > Modified: head/libexec/rc/rc.d/kld > ============================================================ > ================== > --- head/libexec/rc/rc.d/kld Sun Apr 7 18:24:26 2019 (r346016) > +++ head/libexec/rc/rc.d/kld Sun Apr 7 18:31:45 2019 (r346017) > @@ -46,7 +46,7 @@ kld_start() > > echo 'Loading kernel modules:' > for _kld in $kld_list ; do > - load_kld -e ${_kld}.ko $_kld > + load_kld $_kld > done > } > > > Modified: head/libexec/rc/rc.d/mdconfig > ============================================================ > ================== > --- head/libexec/rc/rc.d/mdconfig Sun Apr 7 18:24:26 2019 > (r346016) > +++ head/libexec/rc/rc.d/mdconfig Sun Apr 7 18:31:45 2019 > (r346017) > @@ -114,7 +114,7 @@ mdconfig_start() > continue > fi > if [ "${_file}" != "${_file%.uzip}" ]; then > - load_kld -m g_uzip geom_uzip || > return 3 > + load_kld geom_uzip || return 3 > # sleep a bit to allow creation of > /dev/mdX.uzip > sleep 2 > fi > > Modified: head/libexec/rc/rc.d/mdconfig2 > ============================================================ > ================== > --- head/libexec/rc/rc.d/mdconfig2 Sun Apr 7 18:24:26 2019 > (r346016) > +++ head/libexec/rc/rc.d/mdconfig2 Sun Apr 7 18:31:45 2019 > (r346017) > @@ -123,7 +123,7 @@ mdconfig2_start() > # been created. > if [ "${_type}" = "vnode" -a "${_fs}" != "/" ]; then > if [ "${_file}" != "${_file%.uzip}" ]; then > - load_kld -m g_uzip geom_uzip || return 3 > + load_kld geom_uzip || return 3 > fi > if is_readonly ${_fs}; then > warn "${_fs} is mounted read-only, > skipping ${_md}." > > Modified: head/libexec/rc/rc.d/mountcritremote > ============================================================ > ================== > --- head/libexec/rc/rc.d/mountcritremote Sun Apr 7 18:24:26 2019 > (r346016) > +++ head/libexec/rc/rc.d/mountcritremote Sun Apr 7 18:31:45 2019 > (r346017) > @@ -27,7 +27,7 @@ mountcritremote_precmd() > case "`mount -d -a -t nfs 2> /dev/null`" in > *mount_nfs*) > # Handle absent nfs client support > - load_kld -m nfs nfscl || return 1 > + load_kld nfscl || return 1 > ;; > esac > return 0 > > Modified: head/libexec/rc/rc.d/syscons > ============================================================ > ================== > --- head/libexec/rc/rc.d/syscons Sun Apr 7 18:24:26 2019 > (r346016) > +++ head/libexec/rc/rc.d/syscons Sun Apr 7 18:31:45 2019 > (r346017) > @@ -346,7 +346,7 @@ syscons_start() > for i in `kldstat | awk '$5 ~ "_saver\.ko$" { print $5 > }'`; do > kldunload ${i} > done > - load_kld -e _saver ${saver}_saver > + load_kld ${saver}_saver > ;; > esac > > > Modified: head/libexec/rc/rc.subr > ============================================================ > ================== > --- head/libexec/rc/rc.subr Sun Apr 7 18:24:26 2019 (r346016) > +++ head/libexec/rc/rc.subr Sun Apr 7 18:31:45 2019 (r346017) > @@ -1853,48 +1853,29 @@ mount_md() > } > > # Code common to scripts that need to load a kernel module > -# if it isn't in the kernel yet. Syntax: > -# load_kld [-e regex] [-m module] file > -# where -e or -m chooses the way to check if the module > -# is already loaded: > -# regex is egrep'd in the output from `kldstat -v', > -# module is passed to `kldstat -m'. > -# The default way is as though `-m file' were specified. > +# if it isn't in the kernel yet. Syntax: > +# load_kld file > load_kld() > { > - local _loaded _mod _opt _re > + local _opt > > + # Silently ignore legacy options; they are unnecessary > while getopts "e:m:" _opt; do > case "$_opt" in > - e) _re="$OPTARG" ;; > - m) _mod="$OPTARG" ;; > - *) err 3 'USAGE: load_kld [-e regex] [-m module] file' ;; > + e) ;; > + m) ;; > + *) err 3 'USAGE: load_kld file' ;; > esac > done > shift $(($OPTIND - 1)) > if [ $# -ne 1 ]; then > - err 3 'USAGE: load_kld [-e regex] [-m module] file' > + err 3 'USAGE: load_kld file' > fi > - _mod=${_mod:-$1} > - _loaded=false > - if [ -n "$_re" ]; then > - if kldstat -v | egrep -q -e "$_re"; then > - _loaded=true > - fi > + if ! kldload -n "$1"; then > + warn "Unable to load kernel module $1" > + return 1 > else > - if kldstat -q -m "$_mod"; then > - _loaded=true > - fi > - fi > - if ! $_loaded; then > - if ! kldload "$1"; then > - warn "Unable to load kernel module $1" > - return 1 > - else > - info "$1 kernel module loaded." > - fi > - else > - debug "load_kld: $1 kernel module already loaded." > + info "$1 kernel module loaded." > fi > return 0 > } > > Modified: head/share/man/man5/rc.conf.5 > ============================================================ > ================== > --- head/share/man/man5/rc.conf.5 Sun Apr 7 18:24:26 2019 > (r346016) > +++ head/share/man/man5/rc.conf.5 Sun Apr 7 18:31:45 2019 > (r346017) > @@ -24,7 +24,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd March 21, 2019 > +.Dd April 7, 2019 > .Dt RC.CONF 5 > .Os > .Sh NAME > @@ -249,9 +249,7 @@ Default > .It Va kld_list > .Pq Vt str > A whitespace-separated list of kernel modules to load right after > -the local disks are mounted, without any > -.Pa .ko > -extension or path. > +the local disks are mounted, with optional path. > Loading modules at this point in the boot process is > much faster than doing it via > .Pa /boot/loader.conf > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" >