Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Jan 2016 20:33:21 +0100
From:      Oliver Pinter <oliver.pinter@hardenedbsd.org>
To:        Edward Tomasz Napierala <trasz@freebsd.org>
Cc:        "src-committers@freebsd.org" <src-committers@freebsd.org>,  "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,  "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r286234 - head/sys/boot/common
Message-ID:  <CAPQ4ffupme%2BVDn%2BO1t11-t22QFZktvWGPMwhkSZs-3TOZmPf2A@mail.gmail.com>
In-Reply-To: <201508031627.t73GRbTB092225@repo.freebsd.org>
References:  <201508031627.t73GRbTB092225@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Aug 3, 2015 at 6:27 PM, Edward Tomasz Napierala
<trasz@freebsd.org> wrote:
> Author: trasz
> Date: Mon Aug  3 16:27:36 2015
> New Revision: 286234
> URL: https://svnweb.freebsd.org/changeset/base/286234
>
> Log:
>   Fix a problem which made loader(8) load non-kld files twice.
>
>   For example, without this patch, the following three lines
>   in /boot/loader.conf would result in /boot/root.img being preloaded
>   twice, and two md(4) devices - md0 and md1 - being created.
>
>   initmd_load="YES"
>   initmd_type="md_image"
>   initmd_name="/boot/root.img"
>
>   Reviewed by:  marcel@
>   MFC after:    1 month

Do you still plan to MFC this commit to 10-STABLE / 10.3?


>   Sponsored by: The FreeBSD Foundation
>   Differential Revision:        https://reviews.freebsd.org/D3204
>
> Modified:
>   head/sys/boot/common/module.c
>
> Modified: head/sys/boot/common/module.c
> ==============================================================================
> --- head/sys/boot/common/module.c       Mon Aug  3 14:58:46 2015        (r286233)
> +++ head/sys/boot/common/module.c       Mon Aug  3 16:27:36 2015        (r286234)
> @@ -102,6 +102,7 @@ COMMAND_SET(load, "load", "load a kernel
>  static int
>  command_load(int argc, char *argv[])
>  {
> +    struct preloaded_file *fp;
>      char       *typestr;
>      int                dofile, dokld, ch, error;
>
> @@ -139,6 +140,13 @@ command_load(int argc, char *argv[])
>             command_errmsg = "invalid load type";
>             return(CMD_ERROR);
>         }
> +
> +       fp = file_findfile(argv[1], typestr);
> +       if (fp) {
> +               sprintf(command_errbuf, "warning: file '%s' already loaded", argv[1]);
> +               return (CMD_ERROR);
> +       }
> +
>         return (file_loadraw(argv[1], typestr, 1) ? CMD_OK : CMD_ERROR);
>      }
>      /*
> _______________________________________________
> svn-src-head@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPQ4ffupme%2BVDn%2BO1t11-t22QFZktvWGPMwhkSZs-3TOZmPf2A>