Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Freddy Spierenburg <freddy@dusktilldawn.nl>
Cc: linux-mips@linux-mips.org
Subject: Re: [PATCH] small time list process error in prom_getenv()
Date: Thu, 30 Mar 2006 19:02:36 +0400	[thread overview]
Message-ID: <442BF30C.5020508@ru.mvista.com> (raw)
In-Reply-To: <4427A31F.9080801@ru.mvista.com>

Hello.

Sergei Shtylylov wrote:

>> I found a small time bug in prom_getenv() for which I like to
>> share the fix with y'all.

>> prom_envp is an array with two elements per environment variable.
>> So for instance element 0 is memsize and element 1 is 0x08000000
>> for the environment variable memsize=0x08000000.

>> The code for prom_getenv() only skips one element when it's in
>> search for the next environment variable. It should of course
>> step two elements.

>> I found this error in two files and for both I include a patch to
>> fix the problem.

>> ------------------------------------------------------------------------
>>
>> diff -Naur linux.orig/arch/mips/philips/pnx8550/common/prom.c 
>> linux/arch/mips/philips/pnx8550/common/prom.c
>> --- linux.orig/arch/mips/philips/pnx8550/common/prom.c    2006-03-22 
>> 15:25:58.000000000 +0000
>> +++ linux/arch/mips/philips/pnx8550/common/prom.c    2006-03-22 
>> 15:25:23.000000000 +0000
>> @@ -70,7 +70,7 @@
>>          if(strncmp(envname, env->name, i) == 0) {
>>              return(env->name + strlen(envname) + 1);
>>          }
>> -        env++;
>> +        env+=2;
>>      }
>>      return(NULL);
>>  }

>    Not sure what loader the Philips target uses...

    It uses some kind of Philips' own loader, so this code should be better 
left alone...

WBR, Sergei

  parent reply	other threads:[~2006-03-30 14:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-27  7:43 [PATCH] small time list process error in prom_getenv() Freddy Spierenburg
2006-03-27  8:32 ` Sergei Shtylylov
2006-03-27 18:44   ` [PATCH] Au1xx0: fix prom_getenv() to handle YAMON style environment Sergei Shtylylov
2006-03-28 14:54   ` [PATCH] rtc.h: fixes to make genrtc.c compilable Ralf Rösch
2006-03-28 15:12   ` Ralf Rösch
2006-03-28 15:14     ` Sergei Shtylylov
2006-03-30 15:02   ` Sergei Shtylyov [this message]
2006-03-31 21:20   ` [PATCH] Au1550: make OSS drivers look pretty on loading Sergei Shtylyov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=442BF30C.5020508@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=freddy@dusktilldawn.nl \
    --cc=linux-mips@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox