Re: svn commit: r241688 - head/sys/net
On 18.10.2012 16:11, Gleb Smirnoff wrote: On Thu, Oct 18, 2012 at 02:08:26PM +, Andre Oppermann wrote: A> Author: andre A> Date: Thu Oct 18 14:08:26 2012 A> New Revision: 241688 A> URL: http://svn.freebsd.org/changeset/base/241688 A> A> Log: A> Use LOG_WARNING level in in_attachdomain1() instead of printf(). A> A> Submitted by: vijju.singh-at-gmail.com A> A> Modified: A> head/sys/net/if.c A> A> Modified: head/sys/net/if.c A> == A> --- head/sys/net/if.c Thu Oct 18 13:57:28 2012(r241687) A> +++ head/sys/net/if.c Thu Oct 18 14:08:26 2012(r241688) A> @@ -711,8 +711,8 @@ if_attachdomain1(struct ifnet *ifp) A> return; A> if (ifp->if_afdata_initialized >= domain_init_status) { A> IF_AFDATA_UNLOCK(ifp); A> - printf("if_attachdomain called more than once on %s\n", A> - ifp->if_xname); A> + log(LOG_WARNING, "if_attachdomain called more than once " A> + "on %s\n", ifp->if_xname); A> return; A> } A> ifp->if_afdata_initialized = domain_init_status; It'll be even more perfect if done as "%s called more than once on %s\n", __func__, ifp->if_xname Thanks, done in r241725. And do we need "\n" for log(9)? Yes. -- Andre ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r241688 - head/sys/net
On Thu, Oct 18, 2012 at 02:08:26PM +, Andre Oppermann wrote: A> Author: andre A> Date: Thu Oct 18 14:08:26 2012 A> New Revision: 241688 A> URL: http://svn.freebsd.org/changeset/base/241688 A> A> Log: A> Use LOG_WARNING level in in_attachdomain1() instead of printf(). A> A> Submitted by: vijju.singh-at-gmail.com A> A> Modified: A> head/sys/net/if.c A> A> Modified: head/sys/net/if.c A> == A> --- head/sys/net/if.cThu Oct 18 13:57:28 2012(r241687) A> +++ head/sys/net/if.cThu Oct 18 14:08:26 2012(r241688) A> @@ -711,8 +711,8 @@ if_attachdomain1(struct ifnet *ifp) A> return; A> if (ifp->if_afdata_initialized >= domain_init_status) { A> IF_AFDATA_UNLOCK(ifp); A> -printf("if_attachdomain called more than once on %s\n", A> -ifp->if_xname); A> +log(LOG_WARNING, "if_attachdomain called more than once " A> +"on %s\n", ifp->if_xname); A> return; A> } A> ifp->if_afdata_initialized = domain_init_status; It'll be even more perfect if done as "%s called more than once on %s\n", __func__, ifp->if_xname And do we need "\n" for log(9)? -- Totus tuus, Glebius. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r241688 - head/sys/net
Author: andre Date: Thu Oct 18 14:08:26 2012 New Revision: 241688 URL: http://svn.freebsd.org/changeset/base/241688 Log: Use LOG_WARNING level in in_attachdomain1() instead of printf(). Submitted by: vijju.singh-at-gmail.com Modified: head/sys/net/if.c Modified: head/sys/net/if.c == --- head/sys/net/if.c Thu Oct 18 13:57:28 2012(r241687) +++ head/sys/net/if.c Thu Oct 18 14:08:26 2012(r241688) @@ -711,8 +711,8 @@ if_attachdomain1(struct ifnet *ifp) return; if (ifp->if_afdata_initialized >= domain_init_status) { IF_AFDATA_UNLOCK(ifp); - printf("if_attachdomain called more than once on %s\n", - ifp->if_xname); + log(LOG_WARNING, "if_attachdomain called more than once " + "on %s\n", ifp->if_xname); return; } ifp->if_afdata_initialized = domain_init_status; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"