Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751746Ab1FBOQt (ORCPT ); Thu, 2 Jun 2011 10:16:49 -0400 Received: from out02.mta.xmission.com ([166.70.13.232]:53954 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750970Ab1FBOQq (ORCPT ); Thu, 2 Jun 2011 10:16:46 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: Alan Cox Cc: Kay Sievers , Lucas De Marchi , linux-kernel@vger.kernel.org, Nick Piggin , Al Viro , Christoph Hellwig , Stephen Rothwell , Andrew Morton , David Howells , "Serge E. Hallyn" , Daniel Lezcano , Jiri Slaby , Greg Kroah-Hartman , James Morris References: <1306930476-1899-1-git-send-email-lucas.demarchi@profusion.mobi> <20110602134338.0c56160e@lxorguk.ukuu.org.uk> Date: Thu, 02 Jun 2011 07:16:36 -0700 In-Reply-To: <20110602134338.0c56160e@lxorguk.ukuu.org.uk> (Alan Cox's message of "Thu, 2 Jun 2011 13:43:38 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-XM-SPF: eid=;;;mid=;;;hst=in01.mta.xmission.com;;;ip=98.207.153.68;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX191xgjUNUTDqbfKyVutF7htpT708THjmHQ= X-SA-Exim-Connect-IP: 98.207.153.68 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.0 T_TM2_M_HEADER_IN_MSG BODY: T_TM2_M_HEADER_IN_MSG * -3.0 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa03 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject * 0.4 UNTRUSTED_Relay Comes from a non-trusted relay X-Spam-DCC: XMission; sa03 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;Alan Cox X-Spam-Relay-Country: Subject: Re: [PATCH] sysctl: add support for poll() X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Fri, 06 Aug 2010 16:31:04 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1415 Lines: 37 Alan Cox writes: >> Host names are dynamic, can change during system runtime by dhcp or >> similar setups, or just get changed by the user. > > I don't actually see what this has to do with utsname. uname historically > defined nodename as "name within an implementation-defined communications > network" and actually tended to be the UUCP name. Modern SuS says "`the > name of the node of the communications network to which this node is > attached, if any" > > The latter unfortunately makes no sense anyway and is a fine example of > standards body cluelessness as name mapping on IP networks is not one > name per host, and also because the standard doesn't require the fields > in the struct are long enough to hold a DNS name! > > (Indeed in its usual head up backside manner its technically valid to > define > > char nodename[1]; > > and have only \0 as a valid reply) However we have conveniently defined sethostname and gethostname to use the same state in the kernel, as uname. I believe at least one of these interfaces that map to the same storage in linux has a usable size guaranteed by all of the implementations. Eric -- 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/