Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Feb 2018 16:13:23 -0600
From:      Kyle Evans <kevans@freebsd.org>
To:        Alexander Nasonov <alnsn@yandex.ru>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r329587 - head/stand/lua
Message-ID:  <CACNAnaF0YTdOTPUJEiec8ryE=T92sAdZfPk9bEFZmF9BMY2yYg@mail.gmail.com>
In-Reply-To: <20180219220001.GA12274@neva>
References:  <201802191636.w1JGaTci003687@repo.freebsd.org> <20180219220001.GA12274@neva>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 19, 2018 at 4:00 PM, Alexander Nasonov <alnsn@yandex.ru> wrote:
> Kyle Evans wrote:
>> +             -- Swap the first two menu items on single user boot
>> +             if (core.isSingleUserBoot()) then
>> +                     local multiuser = menu_entries[1];
>> +                     local singleuser = menu_entries[2];
>> +
>> +                     menu_entries[2] = multiuser;
>> +                     menu_entries[1] = singleuser;
>> +             end
>
>                 -- Swap the first two menu items on single user boot
>                 if core.isSingleUserBoot() then
>                         menu_entries[1], menu_entries[2] =
>                             menu_entries[2], menu_entries[1]
>                 end
>

Noted. I ended up expanding this section a little bit later (see:
r329593) and I'm not sure how I feel about the look of this one:


                        -- Shallow copy the table
                        menu_entries = core.shallowCopyTable(menu_entries);

                        menu_entries[1], menu_entries[2] = menu_entries[2],
                            menu_entries[1];

                        menu_entries[1].name, menu_entries[2].name =
                            menu_entries[1].alternate_name,
                            menu_entries[2].alternate_name;

I'll need to sit on that one for a little bit. =)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACNAnaF0YTdOTPUJEiec8ryE=T92sAdZfPk9bEFZmF9BMY2yYg>