Re: [PATCH] 2.5.31 driverfs: patch for your consideration

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Sat Aug 17 2002 - 14:43:26 EST


On Fri, 2002-08-16 at 23:36, Adam Belay wrote:
> +static ssize_t device_read_driver(struct device * dev, char * buf,
> size_t count, loff_t off)
> +{
> + if (dev->driver)
> + return off ? 0 : sprintf(buf,"%s\n",dev->driver->name);
> + else
> + return 0;

Unless you can prove without doubt between now and the end of time the
size is sufficient use snprintf

-
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/



This archive was generated by hypermail 2b29 : Fri Aug 23 2002 - 22:00:14 EST