On Thu, Jul 28, 2005 at 12:50:20PM -0700, David S. Miller wrote: > Netlink uses this kind of thing a lot, but not too much ethtool > stuff does. But something like: > > struct ethtool_perm_addr { > unsigned int cmd; > int size; > char data[0]; > }; > > and the user says how large his buffer is in the request, > and if that is not large enough you return -ETOOBIG or > some similarly discernable error code so that userspace > can allocate a larger buffer. In fact, the kernel can > rewrite the "size" field in this case to indicate how > large the buffer needs to be to hold the full address.
Thanks, Dave. Looks great! Jon, you have your assignment... :-) John -- John W. Linville [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html