[PATCH 2/2] Fix build without CONFIG_NO_CONFIG_WRITE enabled.

Solomon Peachy pizza at shaftnet.org
Sat Mar 16 08:30:50 EDT 2013

On Sat, Mar 16, 2013 at 12:32:35PM +0200, Jouni Malinen wrote:
> On Mon, Mar 11, 2013 at 05:34:58PM -0400, Solomon Peachy wrote:
> > +#ifndef NO_CONFIG_WRITE
> >  static char * wpa_config_write_eap(const struct parse_data *data,
> >  				   struct wpa_ssid *ssid)
> NO_CONFIG_WRITE is not defined anywhere.. Was this supposed to be

Actually, it is correct -- if you look at the top of config.c, you'll 
see this:


It's kinda silly, IMO, but I was going for minimal patches to solve the 
build problems I had.

> > +#ifndef NO_CONFIG_WRITE
> >  /**
> >   * wpa_config_get_all - Get all options from network configuration
> Though, this would break a build that has CONFIG_NO_CONFIG_WRITE=y and
> D-Bus interface enabled..

I suppose the most expedient manner here is to add CONFIG_DBUS to the 
conditions that prevents NO_CONFIG_WRITE from being defined.

> > diff --git a/wpa_supplicant/wpas_glue.c b/wpa_supplicant/wpas_glue.c 
> >  	if (wpa_s->conf->update_config) {
> >  		int ret = wpa_config_write(wpa_s->confname, wpa_s->conf);
> While this can be used to reduce the binary size a bit, this is not
> needed to fix the build as far as I can tell.

Upon further digging, you're correct -- All of the bundled config_*.c 
implementations wrap the guts of wpa_config_write with 
CONFIG_NO_CONFIG_WRITE.  I could have written a dummy wpa_config_write() 
function instead, I suppose.
> > @@ -798,8 +802,10 @@ int wpa_supplicant_init_eapol(struct wpa_supplicant *wpa_s)
> >  	ctx->set_config_blob = wpa_supplicant_set_config_blob;
> >  	ctx->get_config_blob = wpa_supplicant_get_config_blob;
> > +#endif /* CONFIG_NO_CONFIG_BLOBS */
> This is a valid fix for CONFIG_NO_CONFIG_BLOBS, but that does not match
> with the commit log for this nor is this a complete solution (D-Bus code
> was similar cases). I fixed the CONFIG_NO_CONFIG_BLOBS part in a
> different commit that addresses all cases.

Great, thanks.

> I did not apply the CONFIG_NO_CONFIG_WRITE parts because I cannot
> reproduce build failure and the use of NO_CONFIG_BLOBS (vs.
> CONFIG_NO_CONFIG_BLOBS) did not look correct.

I think I've explained that now.  (and you meant *_WRITE, not *_BLOBS, correct?)

 - Solomon
Solomon Peachy        		       pizza at shaftnet dot org	 
Melbourne, FL                          ^^ (mail/jabber/gtalk) ^^
Quidquid latine dictum sit, altum viditur.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: not available
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20130316/06309ab6/attachment.pgp 

More information about the HostAP mailing list