Skip to contentSkip to conversation

Cleanup cmd_bootm.c

U-Boot Wolfgang Denk 3 participants 8 messages Aug 19, 2008 – Sep 6, 2008

lore
Share & tools
lore
#0 lore raw

Dear Marian,

in commit 1ee1180b you added code to common/cmd_bootm.c which uses the env_get_char() function. By then, this went through unnoticed.

I'm sorry, but env_get_char() is a function that is internal to the environment handling code. It is not supposed to be exported to arbitrary code. Please do not make any assumptions about the internals of how the environment is stored.

Could you please provide a cleanup patch?

Thanks in advance.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"There's only one way to have a happy marriage and as soon as I learn
what it is I'll get married again."                  - Clint Eastwood
#1 lore raw
Quoted 11 lines · Wolfgang Denk

Dear Marian,

in commit 1ee1180b you added code to common/cmd_bootm.c which uses the env_get_char() function. By then, this went through unnoticed.

I'm sorry, but env_get_char() is a function that is internal to the environment handling code. It is not supposed to be exported to arbitrary code. Please do not make any assumptions about the internals of how the environment is stored.

Could you please provide a cleanup patch?

This wasn't Marian's doing. The ARTOS support was added back in 2003 (commit 7f70e853):

* Patch by Pantelis Antoniou, 21 Apr 2003:
add boot support for ARTOS (a proprietary OS)

How does one access the environment? The only API we seem to have getenv, getenv_r, setenv and envmatch(). I'd argue that envmatch should be removed from common.h as it exposes the internals of how the env it stored.

There aren't any APIs to walk over all environment variables or to get a list of all of them.

- k

#2 lore raw

[U-Boot] ARTOS support?

Does anyone use ARTOS? or have any pointers to it? I can't find anything that is clearly related to ArtOS in a google search. Should we be maintaining support for this?

Pantelis?

- k

#3 lore raw

[U-Boot] ARTOS support?

Quoted 7 lines · Kumar Gala

Does anyone use ARTOS? or have any pointers to it? I can't find anything that is clearly related to ArtOS in a google search. Should we be maintaining support for this?

Pantelis?

- k

AFAIK, it is still used but the products using PPC are long gone.

Nuke it plz (from orbit).

-- Pantelis

#4 lore raw

[U-Boot] ARTOS support?

Quoted 7 lines · Pantelis Antoniou
Quoted 4 lines · Kumar Gala

Does anyone use ARTOS? or have any pointers to it? I can't find anything that is clearly related to ArtOS in a google search. Should we be maintaining support for this?

Quoted 7 lines
Quoted 3 lines

Pantelis?

- k

AFAIK, it is still used but the products using PPC are long gone.

Nuke it plz (from orbit).

Wolfgang, any issue with just removing ARTOS support (seems like the easiest way to fix the env_get_char() issue).

- k

#5 lore raw

[U-Boot] ARTOS support?

Dear Kumar Gala,

Quoted 3 lines · In message <[email protected]> you wrote:

Wolfgang, any issue with just removing ARTOS support (seems like the easiest way to fix the env_get_char() issue).

Which env_get_char() issue are you referring to?

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
######## This message was made from 100% recycled electrons. ########
#6 lore raw

[U-Boot] ARTOS support?

Quoted 9 lines · Wolfgang Denk

Dear Kumar Gala,

In message <D4E20F94-9D70-44EE-

Quoted 3 lines · AC52-58232BDFBB2D at kernel.crashing.org> you wrote:

Wolfgang, any issue with just removing ARTOS support (seems like the easiest way to fix the env_get_char() issue).

Which env_get_char() issue are you referring to?

The one in common/cmd_bootm.c, look at do_bootm_artos().

- k

#7 lore raw

[U-Boot] ARTOS support?

In reply to Pantelis Antoniou

Dear Kumar,

In message <[email protected]>

Quoted 10 lines · Pantelis Antoniou
Quoted 4 lines

Does anyone use ARTOS? or have any pointers to it? I can't find anything that is clearly related to ArtOS in a google search. Should we be maintaining support for this?

AFAIK, it is still used but the products using PPC are long gone.

Nuke it plz (from orbit).

-- Pantelis

So OK, let's remove ARTOS support.

Can you please prepare a patch? Thanks in advance.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Cogito cogito ergo cogito sum - "I think that I  think,  therefore  I
think that I am."          - Ambrose Bierce, "The Devil's Dictionary"