Re: lseek on /proc/kmsg

From: Jan Engelhardt
Date: Tue Mar 22 2005 - 14:28:49 EST


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



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