Messages in this thread | | | Subject | Re: [PATCH] 2.5.31 driverfs: patch for your consideration | From | Alan Cox <> | Date | 17 Aug 2002 20:43:26 +0100 |
| |
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/
| |