mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/7] dhcp: add global var support
Date: Sat, 1 Sep 2012 14:49:22 +0200	[thread overview]
Message-ID: <20120901124922.GC19233@game.jcrosoft.org> (raw)
In-Reply-To: <20120828084038.GD26594@pengutronix.de>

On 10:40 Tue 28 Aug     , Sascha Hauer wrote:
> On Fri, Aug 24, 2012 at 07:06:50AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > This way you can specify as previously set the dhcp parameter via global.dhcp.xxx
> > and get the result via global.dhcp.xxx
> > 
> > This is need for the defaultenv-2 to add the bootp suppport.
> > 
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > ---
> >  net/dhcp.c |  100 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
> >  1 file changed, 99 insertions(+), 1 deletion(-)
> > 
> > diff --git a/net/dhcp.c b/net/dhcp.c
> > index 79efa3e..51c4283 100644
> > --- a/net/dhcp.c
> > +++ b/net/dhcp.c
> > @@ -19,6 +19,8 @@
> >  #include <magicvar.h>
> >  #include <linux/err.h>
> >  #include <getopt.h>
> > +#include <globalvar.h>
> > +#include <init.h>
> >  
> >  #define OPT_SIZE 312	/* Minimum DHCP Options size per RFC2131 - results in 576 byte pkt */
> >  
> > @@ -78,11 +80,39 @@ static IPaddr_t net_dhcp_server_ip;
> >  static uint64_t dhcp_start;
> >  static char dhcp_tftpname[256];
> >  
> > +static const char* dhcp_get_barebox_global(const char * var)
> 
> static const char *dhcp_get_barebox_global
> 
> > +{
> > +	char * var_global = asprintf("global.dhcp.%s", var);
> 
> char *var_global =
> 
> Generally I don't think we should introduce a second set of variables.
> Drop The other ones instead.
I'm ok with it as I 'm going to switch all my board to the defaultenv-2

but other people may not so the only to keep this feature on both env are

1) 2 set of var
2) use glovalbar on defaultenv

I've no preference

Best Regards,
J.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2012-09-01 12:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-24  5:03 [PATCH 0/7] defaultenv-2: add bootp support Jean-Christophe PLAGNIOL-VILLARD
2012-08-24  5:06 ` [PATCH 1/7] dhcp: add global var support Jean-Christophe PLAGNIOL-VILLARD
2012-08-24  5:06   ` [PATCH 2/7] dhcp: add alternative " Jean-Christophe PLAGNIOL-VILLARD
2012-08-24  5:06   ` [PATCH 3/7] dhcp: add retries limit support Jean-Christophe PLAGNIOL-VILLARD
2012-08-24  7:14     ` Roberto Nibali
2012-08-24  5:06   ` [PATCH 4/7] defaultenv-2: eth0 add default global.dhcp.vendor_id Jean-Christophe PLAGNIOL-VILLARD
2012-08-24  5:06   ` [PATCH 5/7] defaultenv-2: boot/net add bootp support Jean-Christophe PLAGNIOL-VILLARD
2012-08-24  5:06   ` [PATCH 6/7] defaultenv-2: add net boot support with kernel and oftree via nfs Jean-Christophe PLAGNIOL-VILLARD
2012-08-24  5:06   ` [PATCH 7/7] defaultenv-2: add symbolic link support to boot/nfs Jean-Christophe PLAGNIOL-VILLARD
2012-08-28  8:47     ` Sascha Hauer
2012-09-01 12:47       ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-24  7:26   ` [PATCH 1/7] dhcp: add global var support Roberto Nibali
2012-08-28  8:40   ` Sascha Hauer
2012-09-01 12:49     ` Jean-Christophe PLAGNIOL-VILLARD [this message]

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=20120901124922.GC19233@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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