lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 21 Jan 2008 22:04:54 +0900
From:	Tejun Heo <htejun@...il.com>
To:	Matthew Wilcox <matthew@....cx>
CC:	randy.dunlap@...cle.com, daniel.ritz-ml@...ssonline.ch,
	jeff@...zik.org, linux-kernel@...r.kernel.org,
	linux-ide@...r.kernel.org
Subject: Re: [PATCHSET] printk: implement printk_header() and merging printk,
 take #2

Matthew Wilcox wrote:
> On Mon, Jan 21, 2008 at 02:13:52PM +0900, Tejun Heo wrote:
>> In a nutshell, printk_header() lets you do the following atomically
>> (against other messages).
>>
>>  code:
>>   printk(KERN_INFO "ata1.00: ", "line0\nline1\nline2\n");
>>
>>  output:
>>   <6>ata1.00: line0
>>   <6>         line1
>>   <6>         line2
> 
> I think this is a really bad idea.  It's much better to have:
> 
> <6>ata1.00: line0
> <6>ata1.00: line1
> <6>ata1.00: line2
> 
> That way you can grep for ata1.00 and get all messages relevant to that
> device.

It has some pros and cons.  Having indentation makes things easier on
human eyes but more difficult on scripts, but not too difficult -
indented lines can easily be matched with a bit of scripting.  Changing
the behavior is easy but I'm still inclined toward indentation because
printing header every line loses information about message boundaries.
Maybe there's a way to satisfy both like omitting the separator from the
second line on.

ata1.00: line0
ata1.00  line1
ata1.00  line2

Hmm... Any better ideas?

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ