From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752169AbdIRCpv (ORCPT ); Sun, 17 Sep 2017 22:45:51 -0400 Received: from smtprelay0082.hostedemail.com ([216.40.44.82]:51897 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751271AbdIRCpu (ORCPT ); Sun, 17 Sep 2017 22:45:50 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3867:3868:3870:3871:3872:3874:4250:4321:5007:6119:6691:6742:7903:10004:10400:10848:11026:11232:11473:11658:11783:11914:12043:12296:12740:12895:13069:13095:13311:13357:13439:13894:14659:14721:21080:21088:21433:21451:21627:30054:30060:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: vase47_6cd40645adf3e X-Filterd-Recvd-Size: 2729 Message-ID: <1505702746.12022.2.camel@perches.com> Subject: Re: printk: what is going on with additional newlines? From: Joe Perches To: Sergey Senozhatsky Cc: Linus Torvalds , Sergey Senozhatsky , Petr Mladek , Steven Rostedt , Pavel Machek , Jan Kara , Andrew Morton , Jiri Slaby , Andreas Mohr , Tetsuo Handa , Linux Kernel Mailing List Date: Sun, 17 Sep 2017 19:45:46 -0700 In-Reply-To: <20170918024111.GC3161@jagdpanzerIV.localdomain> References: <20170830024703.GA17175@jagdpanzerIV.localdomain> <20170905094452.GE8741@pathway.suse.cz> <20170905095900.GC2066@jagdpanzerIV.localdomain> <20170905122154.GG8741@pathway.suse.cz> <20170905134228.GE521@jagdpanzerIV.localdomain> <20170906075554.GI8741@pathway.suse.cz> <20170917062608.GA512@tigerII.localdomain> <20170918004641.GA3161@jagdpanzerIV.localdomain> <1505701349.12022.1.camel@perches.com> <20170918024111.GC3161@jagdpanzerIV.localdomain> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2017-09-18 at 11:41 +0900, Sergey Senozhatsky wrote: > On (09/17/17 19:22), Joe Perches wrote: > > On Mon, 2017-09-18 at 09:46 +0900, Sergey Senozhatsky wrote: > > > there is another reason why I think that, yes, we probably better do > > > it some other way. and the reason is that not every message that looks > > > like !PREFIX (does not start with KERN_SOH_ASCII) is _actually_ a > > > !PREFIX message. the normal/usual way is to have something like > > > > > > printk(KERN_SOH_ASCII %d " foo bar / %s %s\n", "foo", "bar"); > > > > > > but some messages look like > > > > > > printk("%s", KERN_SOH_ASCII %d "foo bar\n"); > > > > There are no messages that look like that. > > > > There are 2 entries somewhat like that though > > > > net/bridge/netfilter/ebt_log.c: printk(KERN_SOH "%c%s IN=%s OUT=%s MAC source = %pM MAC dest = %pM proto = 0x%04x", > > net/netfilter/nf_log_common.c:  nf_log_buf_add(m, KERN_SOH "%c%sIN=%s OUT=%s ", > > take a look at ACPI acpi_os_vprintf(). for instance. I've looked. Try git grep KERN_SOH.