Patchwork wpa_supplicant: Print initialization information on startup.

login
register
mail settings
Submitter Ben Greear
Date April 3, 2012, 4:43 a.m.
Message ID <1333428202-1244-1-git-send-email-greearb@candelatech.com>
Download mbox | patch
Permalink /patch/150320/
State Superseded
Headers show

Comments

Ben Greear - April 3, 2012, 4:43 a.m.
From: Ben Greear <greearb@candelatech.com>

This lets someone know if they have a log file that properly
starts at the beginning.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
:100644 100644 bde956e... 364c1a5... M	wpa_supplicant/main.c
 wpa_supplicant/main.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
Jouni Malinen - April 3, 2012, 8:47 a.m.
On Mon, Apr 02, 2012 at 09:43:22PM -0700, greearb@candelatech.com wrote:
> +		wpa_printf(MSG_ERROR, "Successfully initialized wpa_supplicant");

MSG_ERROR saying that things worked? ;-)  MSG_INFO could be somewhat
more appropriate here..
Ben Greear - April 3, 2012, 4:37 p.m.
On 04/03/2012 01:47 AM, Jouni Malinen wrote:
> On Mon, Apr 02, 2012 at 09:43:22PM -0700, greearb@candelatech.com wrote:
>> +		wpa_printf(MSG_ERROR, "Successfully initialized wpa_supplicant");
>
> MSG_ERROR saying that things worked? ;-)  MSG_INFO could be somewhat
> more appropriate here..
>

Well, I want it to always be printed...thought maybe INFO wasn't always
printed, but likely ERROR was.

I'll change it if you want, however...

Ben
Jouni Malinen - April 3, 2012, 5:42 p.m.
On Tue, Apr 03, 2012 at 09:37:53AM -0700, Ben Greear wrote:
> On 04/03/2012 01:47 AM, Jouni Malinen wrote:
> > On Mon, Apr 02, 2012 at 09:43:22PM -0700, greearb@candelatech.com wrote:
> >> +		wpa_printf(MSG_ERROR, "Successfully initialized wpa_supplicant");

> Well, I want it to always be printed...thought maybe INFO wasn't always
> printed, but likely ERROR was.

INFO is printed unless you have explicitly asked it not to be (-q on
command line). This message is certainly not something that would
justify it to be forced to be displayed as an error unconditionally.

Patch

diff --git a/wpa_supplicant/main.c b/wpa_supplicant/main.c
index bde956e..364c1a5 100644
--- a/wpa_supplicant/main.c
+++ b/wpa_supplicant/main.c
@@ -263,6 +263,9 @@  int main(int argc, char *argv[])
 		exitcode = -1;
 		goto out;
 	}
+	else {
+		wpa_printf(MSG_ERROR, "Successfully initialized wpa_supplicant");
+	}
 
 	for (i = 0; exitcode == 0 && i < iface_count; i++) {
 		if ((ifaces[i].confname == NULL &&