Re: [U-Boot] [PATCH] common: nvedit to protect additional ethernet addresses Part 1/1

2008-12-16 Thread Stefan Althoefer
Dear Wolfgang Denx, >> But your suggested optimizations will only be effective if someone tries to >> write to "serial#". This is not normally done (attempt can be considered >> an error). > > Can it? What make you think so? > > There are lots of boards that come fresh out of production with

Re: [U-Boot] [PATCH] common: nvedit to protect additional ethernet addresses Part 1/1

2008-12-16 Thread Wolfgang Denk
Dear Ben, In message <4947ffdb.9040...@gmail.com> you wrote: > > >> Jerry Van Baren already showed you an elegant way to solve this using > >> scanf(). > > > > Is scanf() available in u-boot? I couldn't find it. ... > I think he meant sscanf(), which should be there. No, we don't have this yet in

Re: [U-Boot] [PATCH] common: nvedit to protect additional ethernet addresses Part 1/1

2008-12-16 Thread Ben Warren
Stefan Althoefer wrote: > Dear Wolfgang Denk > > >> Dear =?iso-8859-15?Q?Stefan_Alth=F6fer?=, >> >> In message <531234...@web.de> you wrote: >> >>> Then maybe we should have >>> >>> #define CONFIG_ENV_PROTECTED_ITEM "ethaddr1,ethaddr2," >>> >>> in board configuration to have the greates

Re: [U-Boot] [PATCH] common: nvedit to protect additional ethernet addresses Part 1/1

2008-12-16 Thread Stefan Althoefer
Dear Wolfgang Denk > Dear =?iso-8859-15?Q?Stefan_Alth=F6fer?=, > > In message <531234...@web.de> you wrote: >> Then maybe we should have >> >> #define CONFIG_ENV_PROTECTED_ITEM "ethaddr1,ethaddr2," >> >> in board configuration to have the greatest flexibility? > > Jerry Van Baren already sho

Re: [U-Boot] [PATCH] common: nvedit to protect additional ethernet addresses Part 1/1

2008-12-15 Thread Wolfgang Denk
Dear =?iso-8859-15?Q?Stefan_Alth=F6fer?=, In message <531234...@web.de> you wrote: > Then maybe we should have > > #define CONFIG_ENV_PROTECTED_ITEM "ethaddr1,ethaddr2," > > in board configuration to have the greatest flexibility? Jerry Van Baren already showed you an elegant way to solve t

Re: [U-Boot] [PATCH] common: nvedit to protect additional ethernet addresses Part 1/1

2008-12-15 Thread Wolfgang Denk
Dear Stefan Althoefer, In message you wrote: > > > That would be one way to avoid unnecessary tests. > > > > Probably not the most elegant approach, agreed. > > > > There are other options, though. > > But your suggested optimizations will only be effective if someone tries to > write to "seri

Re: [U-Boot] [PATCH] common: nvedit to protect additional ethernet addresses Part 1/1

2008-12-08 Thread Jerry Van Baren
Stefan Althoefer wrote: > From fdeee62f0902b25be1a2a6bf52fb714b0f4f9e59 Mon Sep 17 00:00:00 2001 > From: Stefan Althoefer <[EMAIL PROTECTED]> > Date: Sun, 7 Dec 2008 14:17:08 +0100 > Subject: [PATCH] common: nvedit to protect additional ethernet addresses > > This adds "eth[0-9]+addr" to the prote

Re: [U-Boot] [PATCH] common: nvedit to protect additional ethernet addresses Part 1/1

2008-12-07 Thread Stefan Althoefer
Hi Wolfgang Denk > Dear Stefan Althoefer, > > In message <[EMAIL PROTECTED]> you wrote: >> You argue that the code should have a couple of hard to read else cases? > > That would be one way to avoid unnecessary tests. > > Probably not the most elegant approach, agreed. > > There are other opti

Re: [U-Boot] [PATCH] common: nvedit to protect additional ethernet addresses Part 1/1

2008-12-07 Thread Wolfgang Denk
Dear Stefan Althoefer, In message <[EMAIL PROTECTED]> you wrote: > > You argue that the code should have a couple of hard to read else cases? That would be one way to avoid unnecessary tests. Probably not the most elegant approach, agreed. There are other options, though. Best regards, Wolfga

Re: [U-Boot] [PATCH] common: nvedit to protect additional ethernet addresses Part 1/1

2008-12-07 Thread Stefan Althoefer
Wolfgang Denk schrieb: > Dear Stefan Althoefer, > > In message <[EMAIL PROTECTED]> you wrote: >> From fdeee62f0902b25be1a2a6bf52fb714b0f4f9e59 Mon Sep 17 00:00:00 2001 >> From: Stefan Althoefer <[EMAIL PROTECTED]> >> Date: Sun, 7 Dec 2008 14:17:08 +0100 >> Subject: [PATCH] common: nvedit to protec

Re: [U-Boot] [PATCH] common: nvedit to protect additional ethernet addresses Part 1/1

2008-12-07 Thread Wolfgang Denk
Dear Stefan Althoefer, In message <[EMAIL PROTECTED]> you wrote: > From fdeee62f0902b25be1a2a6bf52fb714b0f4f9e59 Mon Sep 17 00:00:00 2001 > From: Stefan Althoefer <[EMAIL PROTECTED]> > Date: Sun, 7 Dec 2008 14:17:08 +0100 > Subject: [PATCH] common: nvedit to protect additional ethernet addresses >

Re: [U-Boot] [PATCH] common: nvedit to protect additional ethernet addresses Part 1/1

2008-12-07 Thread Stefan Althoefer
>From fdeee62f0902b25be1a2a6bf52fb714b0f4f9e59 Mon Sep 17 00:00:00 2001 From: Stefan Althoefer <[EMAIL PROTECTED]> Date: Sun, 7 Dec 2008 14:17:08 +0100 Subject: [PATCH] common: nvedit to protect additional ethernet addresses This adds "eth[0-9]+addr" to the protected environment variables that can

Re: [U-Boot] [PATCH] common: nvedit to protect additional ethernet addresses Part 1/1

2008-12-07 Thread Wolfgang Denk
Dear Ben Warren, In message <[EMAIL PROTECTED]> you wrote: > > Neat, although it's very tempting to pull a Python 3 and say "screw > reverse compatibility" and change this naming convention. If we'd change it, then my vote wouldbe to change ethaddr into eth0addr :-) The reasoning for the name (

Re: [U-Boot] [PATCH] common: nvedit to protect additional ethernet addresses Part 1/1

2008-12-06 Thread Ben Warren
Jerry Van Baren wrote: > Wolfgang Denk wrote: > >> Dear Stefan Althoefer, >> >> In message <[EMAIL PROTECTED]> you wrote: >> >>> This patches cmd_nvedit to reject changes for "ethaddr." in addition to >>> "ethaddr" >>> and "serial#". This is intendend to protect changes to additional ether

Re: [U-Boot] [PATCH] common: nvedit to protect additional ethernet addresses Part 1/1

2008-12-06 Thread Jerry Van Baren
Wolfgang Denk wrote: > Dear Stefan Althoefer, > > In message <[EMAIL PROTECTED]> you wrote: >> This patches cmd_nvedit to reject changes for "ethaddr." in addition to >> "ethaddr" >> and "serial#". This is intendend to protect changes to additional ethernet >> addresses (e.g. "ethernet1"). > > T

Re: [U-Boot] [PATCH] common: nvedit to protect additional ethernet addresses Part 1/1

2008-12-06 Thread Wolfgang Denk
Dear Stefan Althoefer, In message <[EMAIL PROTECTED]> you wrote: > This patches cmd_nvedit to reject changes for "ethaddr." in addition to > "ethaddr" > and "serial#". This is intendend to protect changes to additional ethernet > addresses (e.g. "ethernet1"). The patch is bogus, as additional et

Re: [U-Boot] [PATCH] common: nvedit to protect additional ethernet addresses Part 1/1

2008-12-05 Thread Stefan Althoefer
This patches cmd_nvedit to reject changes for "ethaddr." in addition to "ethaddr" and "serial#". This is intendend to protect changes to additional ethernet addresses (e.g. "ethernet1"). The code was rewritten to be more clear. Signed-off-by: Stefan Althoefer <[EMAIL PROTECTED]> --- diff -uprN

Re: [U-Boot] [PATCH] common: nvedit to protect additional ethernet addresses Part 1/1

2008-12-04 Thread Ben Warren
Dear Stefan, Stefan Althöfer wrote: > Then maybe we should have > > #define CONFIG_ENV_PROTECTED_ITEM "ethaddr1,ethaddr2," > > in board configuration to have the greatest flexibility? > > It might be useful to have a general protection mechanism, but probably not right now. Please impleme

Re: [U-Boot] [PATCH] common: nvedit to protect additional ethernet addresses Part 1/1

2008-12-04 Thread Jerry Van Baren
(Resent in response to complex, non scalable suggestions: IMHO strncmp (name, "ethaddr", 7) is a simple and good solution that covers all known and several unknown cases.) [EMAIL PROTECTED] wrote: > [PATCH] common: nvedit to protect additional ethernet addresses > > This patch adds "ethaddr1"

Re: [U-Boot] [PATCH] common: nvedit to protect additional ethernet addresses Part 1/1

2008-12-04 Thread Stefan Althöfer
Then maybe we should have #define CONFIG_ENV_PROTECTED_ITEM "ethaddr1,ethaddr2," in board configuration to have the greatest flexibility? > [EMAIL PROTECTED] wrote: > > [PATCH] common: nvedit to protect additional ethernet addresses > > > > This patch adds "ethaddr1" and "ethaddr2" to the pr

Re: [U-Boot] [PATCH] common: nvedit to protect additional ethernet addresses Part 1/1

2008-12-04 Thread Ben Warren
[EMAIL PROTECTED] wrote: > [PATCH] common: nvedit to protect additional ethernet addresses > > This patch adds "ethaddr1" and "ethaddr2" to the protected > environment variables that can only be written once. > > > The patch is against "latest" u-boot git-repository > > Please be patient if st

Re: [U-Boot] [PATCH] common: nvedit to protect additional ethernet addresses Part 1/1

2008-12-04 Thread Jerry Van Baren
[EMAIL PROTECTED] wrote: > [PATCH] common: nvedit to protect additional ethernet addresses > > This patch adds "ethaddr1" and "ethaddr2" to the protected > environment variables that can only be written once. > > > The patch is against "latest" u-boot git-repository > > Please be patient if

[U-Boot] [PATCH] common: nvedit to protect additional ethernet addresses Part 1/1

2008-12-04 Thread stefan . althoefer
[PATCH] common: nvedit to protect additional ethernet addresses This patch adds "ethaddr1" and "ethaddr2" to the protected environment variables that can only be written once. The patch is against "latest" u-boot git-repository Please be patient if style of submission or patches are offendi