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) 1989, 2012, Oracle and/or its affiliates. All rights reserved. 2N/A/* Copyright (c) 1988 AT&T */ 2N/A/* All Rights Reserved */ 2N/A * Call the kernel implementation of *realpath. It either takes 2N/A * a path (with fd = AT_FDCWD) or a file descriptor. 2N/A * If no buffer is passed in, we allocate a properly sized buffer. 2N/A * If the buffer size is 0, we will grow it until the kernel will 2N/A * returns a value or an error other than ERANGE. 2N/A /* Standard requires ENAMETOOLONG and EINVAL. */ 2N/A * Canonicalize the path given in file_name, resolving away all symbolic link 2N/A * components. Store the result into the buffer named by resolved_name, which 2N/A * must be long enough. If no buffer is given, there is no limit. Returns NULL 2N/A * on failure and resolved_name on success. On failure, to maintain 2N/A * compatibility with the past, the contents of file_name will be copied 2N/A * into resolved_name. 2N/A * EINVAL was likely mapped from EFAULT; 2N/A * we cannot dereference file_name or resolved_name. 2N/A * frealpath() is similar to realpath but requires specifying the a size of 2N/A * the buffer; if no buffer is given, one will be allocated. If the size is 0, 2N/A * the system tries to allocate a buffer large enough to store the result. 2N/A * There is no limit to what this function will return in that case. 2N/A * GNU extension. No limit in what we return.