Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261742AbVCVTc7 (ORCPT ); Tue, 22 Mar 2005 14:32:59 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261741AbVCVT35 (ORCPT ); Tue, 22 Mar 2005 14:29:57 -0500 Received: from alog0071.analogic.com ([208.224.220.86]:57005 "EHLO chaos.analogic.com") by vger.kernel.org with ESMTP id S261710AbVCVT3b (ORCPT ); Tue, 22 Mar 2005 14:29:31 -0500 Date: Tue, 22 Mar 2005 14:26:52 -0500 (EST) From: linux-os Reply-To: linux-os@analogic.com To: Jan Engelhardt cc: Linux kernel Subject: Re: lseek on /proc/kmsg In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 929 Lines: 33 On Tue, 22 Mar 2005, Jan Engelhardt wrote: > Hi, > >> how am I supposed to clear the kmsg buffer since it's not a terminal?? > > fd = open("/proc/kmsg", O_RDONLY | O_NONBLOCK); > while(read(fd, buf, sizeof(buf)) > 0); > if(errno == EAGAIN) { printf("Clear!\n"); } > > This is language (spoken-wise) neutral :p > Gawd, you are a hacker. I already have to suck on pipes because I can't seek them. Now, I can't even seek a file-system???!! > > > Jan Engelhardt > -- > Cheers, Dick Johnson Penguin : Linux version 2.6.11 on an i686 machine (5537.79 BogoMips). Notice : All mail here is now cached for review by Dictator Bush. 98.36% of all statistics are fiction. - 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/