Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 7 Feb 2002 16:01:24 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 7 Feb 2002 16:01:07 -0500 Received: from air-2.osdl.org ([65.201.151.6]:36533 "EHLO segfault.osdlab.org") by vger.kernel.org with ESMTP id ; Thu, 7 Feb 2002 15:59:52 -0500 Date: Thu, 7 Feb 2002 12:59:50 -0800 (PST) From: Patrick Mochel X-X-Sender: To: Alexander Viro cc: Petr Vandrovec , Subject: Re: [PATCH] read() from driverfs files can read more bytes In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 7 Feb 2002, Alexander Viro wrote: > > > On Thu, 7 Feb 2002, Patrick Mochel wrote: > > > It is really nice, but it's too much for the common case. The goal is to > > have each file export one and only one value. Setting up an iterator is > > overkill for one value. > > You don't have to use the iterator side of that. Well, I'll be... I like the seq_ stuff, and the ->read() side of things take care of the issues discussed in this thread. What's even nicer is that if I convert to that, driver callbacks become something like either: int driver_show(struct device * dev, struct seq_file * m) or int driver_show(struct device * dev, char * buf) Have you considered doing write()? -pat - 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/