Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 14 Aug 2002 00:29:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 14 Aug 2002 00:29:40 -0400 Received: from neon-gw-l3.transmeta.com ([63.209.4.196]:27666 "EHLO neon-gw.transmeta.com") by vger.kernel.org with ESMTP id ; Wed, 14 Aug 2002 00:29:40 -0400 Message-ID: <3D59DD94.6040406@zytor.com> Date: Tue, 13 Aug 2002 21:33:24 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020703 X-Accept-Language: en-us, en, sv MIME-Version: 1.0 To: Alexander Viro CC: Benjamin LaHaise , Andrew Morton , Linus Torvalds , lkml Subject: Re: [patch] printk from userspace References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 928 Lines: 26 Alexander Viro wrote: > > I have a better suggestion. How about we make write(2) on /dev/console to > act as printk()? IOW, how about making _all_ writes to console show up in > dmesg? > > Then we don't need anything special to do logging _and_ we get output > of init scripts captured. For free. dmesg(8) would pick that up, klogd(8) > will work as is, etc. > /dev/console is probably unsuitable for this (/dev/console is an interactive device), but something like /dev/kmsg would probably be a good idea -- it can also replace /proc/kmsg. However, Andrew's sys_syslog() change does what I need, since users are used to calling syslog(3) to log messages anyway. -hpa - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/