On Thu, 2006-03-09 at 15:18 -0800, Roland Dreier wrote: > > +static ssize_t show_version(struct device_driver *dev, char *buf) > > +{ > > + return scnprintf(buf, PAGE_SIZE, "%s", ipath_core_version); > > +} > > Any reason you left a "\n" off of this attribute?
Nope, just a bogon. > > +static ssize_t show_atomic_stats(struct device_driver *dev, char *buf) > > +{ > > + memcpy(buf, &ipath_stats, sizeof(ipath_stats)); > > + > > + return sizeof(ipath_stats); > > +} > > I think putting a whole binary struct in a sysfs attribute is > considered a no-no. Grumble. it's a fairly small struct, much less than a page in length, and userspace needs an atomic view of it, instead of reading each of the umpteen broken-out files that we also provide for humean-readable access to each counter. I didn't see any point to implementing the sysfs binary file interface in order to do exactly what this 6-line function does. Still don't, in fact :-) > Another missing "\n" Thanks. <b _______________________________________________ openib-general mailing list openib-general@openib.org http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general