Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261290AbUKFAsa (ORCPT ); Fri, 5 Nov 2004 19:48:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261296AbUKFAsa (ORCPT ); Fri, 5 Nov 2004 19:48:30 -0500 Received: from mail.kroah.org ([69.55.234.183]:31897 "EHLO perch.kroah.org") by vger.kernel.org with ESMTP id S261280AbUKFAsX (ORCPT ); Fri, 5 Nov 2004 19:48:23 -0500 Date: Fri, 5 Nov 2004 16:47:57 -0800 From: Greg KH To: Robert Love Cc: John McCutchan , linux-kernel@vger.kernel.org Subject: Re: [patch] inotify: add FIONREAD support Message-ID: <20041106004755.GA23981@kroah.com> References: <1099696444.6034.266.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1099696444.6034.266.camel@localhost> User-Agent: Mutt/1.5.6i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 819 Lines: 26 On Fri, Nov 05, 2004 at 06:14:04PM -0500, Robert Love wrote: > John, > > There are a handful of "standard" file ioctl's (FIBMAP, FIONREAD, > FIGETBSZ, etc.). We don't have to implement any of them, but FIONREAD > is actually pretty useful: It tells you how many bytes are available on > the fd. Nice idea. > + case FIONREAD: > + bytes = dev->event_count * sizeof (struct inotify_event); > + return put_user(bytes, (int *) p); But sparse will spit out warnings with code like this :( Actually, the whole inotify patch probably isn't sparse clean... thanks, greg k-h - 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/