Re: what's the purpose of MAXHOSTNAMELEN?

From: Robert P. J. Day
Date: Tue Dec 29 2009 - 15:13:53 EST


On Tue, 29 Dec 2009, Jeff Garzik wrote:
... snip ..

> > so lots of people define it but no one uses it. it *is*
> > exported to user space in /usr/include/asm/param.h, but i still
> > have no idea what it's for in user space. obsolete?
>
> According to RFC 1034, "Each node has a label, which is zero to 63
> octets in length"
>
> What is it used for in userspace, and why is it export from the
> kernel? Good question...

it's not clear what value that macro has in user space since (as
i've always understood it) the point of exporting a macro like that to
user space is so that user space apps can *agree* with kernel code
that employs the same macro.

but if absolutely *nothing* in the kernel uses that macro, then
there's nothing for user space to "agree" with. in other words, that
macro cannot *possibly* have any meaningful value in user space. does
that make sense?

my reaction at this point is to simply remove that macro definition
from include/asm-generic/param.h. anything in user space that's using
that macro is simply using a macro with a completely arbitrary value.

rday
--

========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA

Linux Consulting, Training and Kernel Pedantry.

Web page: http://crashcourse.ca
Twitter: http://twitter.com/rpjday
========================================================================
--
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/