Re: [patch] inotify: add FIONREAD support

From: Greg KH
Date: Fri Nov 05 2004 - 19:50:25 EST


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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/