2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 1992, 2011, Oracle and/or its affiliates. All rights reserved. 2N/A * nsswitch "bootparams" database. 2N/A /* bootparams_getbyname() has not set/endent; rewind on each call */ 2N/A * bootparams has the hostname as part of the data in the file, but the other 2N/A * backends don't include it in the data passed to the backend. For this 2N/A * reason, we process everything here and don't bother calling the backend. 2N/A * filter not useful here since the key 2N/A * we are looking for is the first "word" 2N/A * on the line and we can be fast enough. 2N/A * _nss_files_read_line does process the '\' that are used 2N/A * linelen counts the characters up to but excluding the '\n' 2N/A * we need to strip off the host name before returning it. 2N/A /* Skip over leading whitespace */ 2N/A /* Skip over the hostname */ 2N/A /* Skip over whitespace between name and first datum */ 2N/A /* Syntax error -- no data! Just skip it. */