Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 03 Aug 2018 11:46:21 +0300
From:      Toomas Soome <tsoome@me.com>
To:        Warner Losh <imp@bsdimp.com>
Cc:        Toomas Soome <tsoome@freebsd.org>, src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r337231 - head/stand/efi/loader
Message-ID:  <53D5CC0A-16D1-4538-B818-0B7F6E6CAB69@me.com>
In-Reply-To: <CANCZdfrM%2B4vvpAi1bH5t_qWWVue2YnkQ09r8bqTvg%2BdHxmPUjw@mail.gmail.com>
References:  <201808030759.w737xTwO075764@repo.freebsd.org> <CANCZdfrM%2B4vvpAi1bH5t_qWWVue2YnkQ09r8bqTvg%2BdHxmPUjw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help


> On 3 Aug 2018, at 11:32, Warner Losh <imp@bsdimp.com> wrote:
>=20
> Any reason why efipart_inithandles() should even return an error in =
this case? Seems to cause us nothing but trouble so we have to filter =
some, but not all errors which strikes me as a bad design. We should =
only return errors for real errors, like not having enough memory for =
the arrays we need.
>=20
> Warner

The current code does return the efi error translated to errno and does =
leave the filtering/notification for caller. I guess it is good idea to =
filter cases like no devices in-place, however, the fun is with out of =
memory =E2=80=94 at that stage (we even haven't started to probe for =
disks, so we do not have even interpreter) it basically means loader.efi =
failure.

rgds,
toomas


>=20
> On Fri, Aug 3, 2018 at 1:59 AM, Toomas Soome <tsoome@freebsd.org =
<mailto:tsoome@freebsd.org>> wrote:
> Author: tsoome
> Date: Fri Aug  3 07:59:29 2018
> New Revision: 337231
> URL: https://svnweb.freebsd.org/changeset/base/337231 =
<https://svnweb.freebsd.org/changeset/base/337231>;
>=20
> Log:
>   loader.efi: clean up misleading noise from missing block devices
>=20
>   If there are no block devices, there is no need to printout
>   error (ENOENT).
>=20
>   In case of netboot, our image path has no block device, no need to =
make
>   noise about it.
>=20
> Modified:
>   head/stand/efi/loader/main.c
>=20
> Modified: head/stand/efi/loader/main.c
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
> --- head/stand/efi/loader/main.c        Fri Aug  3 02:51:37 2018       =
 (r337230)
> +++ head/stand/efi/loader/main.c        Fri Aug  3 07:59:29 2018       =
 (r337231)
> @@ -545,8 +545,6 @@ find_currdev(EFI_LOADED_IMAGE *img, bool =
do_bootmgr, b
>                                         return (0);
>                         }
>                 }
> -       } else {
> -               printf("Can't find device by handle\n");
>         }
>=20
>         /*
> @@ -862,9 +860,9 @@ main(int argc, CHAR16 *argv[])
>          * march through the device switch probing for things.
>          */
>         i =3D efipart_inithandles();
> -       if (i !=3D 0) {
> +       if (i !=3D 0 && i !=3D ENOENT) {
>                 printf("efipart_inithandles failed with ERRNO %d, =
expect "
> -                   "failures", i);
> +                   "failures\n", i);
>         }
>=20
>         for (i =3D 0; devsw[i] !=3D NULL; i++)
>=20
>=20




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53D5CC0A-16D1-4538-B818-0B7F6E6CAB69>