Patchwork [03/10] linux-user: Move target_to_host_errno_table[] setup out of ioctl loop

login
register
mail settings
Submitter Peter Maydell
Date Aug. 14, 2012, 7:35 p.m.
Message ID <CAFEAcA86Uhvijf+0XgS-90D350h=6T5eM5uXaJiGkd=ecBm7tQ@mail.gmail.com>
Download mbox | patch
Permalink /patch/177428/
State New
Headers show

Comments

Peter Maydell - Aug. 14, 2012, 7:35 p.m.
On 14 August 2012 19:58, Blue Swirl <blauwirbel@gmail.com> wrote:
> On Tue, Aug 14, 2012 at 6:38 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
>> On 14 August 2012 19:27, Blue Swirl <blauwirbel@gmail.com> wrote:
>>> On Tue, Aug 14, 2012 at 9:40 AM, Peter Maydell <peter.maydell@linaro.org> wrote:
>>>> +    /* Build target_to_host_errno_table[] table from
>>>> +     * host_to_target_errno_table[]. */
>>>> +    for (i=0; i < ERRNO_TABLE_SIZE; i++)
>>>
>>> Please add spaces around '=' and braces.

I've updated the pullreq branch. Since this was a trivial change I
don't propose to rebroadcast all 10 patches. This is the diff between
what was there and what is there now:


(ie 'git diff 610dd40 3a1363a')

Please pull :-)

thanks
-- PMM

Patch

--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -4650,8 +4650,9 @@  void syscall_init(void)

     /* Build target_to_host_errno_table[] table from
      * host_to_target_errno_table[]. */
-    for (i=0; i < ERRNO_TABLE_SIZE; i++)
+    for (i = 0; i < ERRNO_TABLE_SIZE; i++) {
         target_to_host_errno_table[host_to_target_errno_table[i]] = i;
+    }

     /* we patch the ioctl size if necessary. We rely on the fact that
        no ioctl has all the bits at '1' in the size field */