readlink.c revision 12789:82cffaae72d5
1284990Scy/* 2284990Scy * CDDL HEADER START 3284990Scy * 4284990Scy * The contents of this file are subject to the terms of the 5284990Scy * Common Development and Distribution License (the "License"). 6284990Scy * You may not use this file except in compliance with the License. 7284990Scy * 8284990Scy * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9284990Scy * or http://www.opensolaris.org/os/licensing. 10284990Scy * See the License for the specific language governing permissions 11284990Scy * and limitations under the License. 12284990Scy * 13284990Scy * When distributing Covered Code, include this CDDL HEADER in each 14284990Scy * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15284990Scy * If applicable, add the following below this CDDL HEADER, with the 16284990Scy * fields enclosed by brackets "[]" replaced with your own identifying 17284990Scy * information: Portions Copyright [yyyy] [name of copyright owner] 18284990Scy * 19284990Scy * CDDL HEADER END 20284990Scy */ 21284990Scy 22284990Scy/* 23284990Scy * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. 24284990Scy */ 25290000Sglebius 26290000Sglebius#include "chkpath.h" 27290000Sglebius#include <sys/fcntl.h> 28284990Scy 29284990Scyint 30284990Scyreadlink(char *p, char *b, int s) 31284990Scy{ 32284990Scy CHKNULL(p); 33284990Scy return (_syscall(SYS_readlinkat, AT_FDCWD, p, b, s)); 34284990Scy} 35290000Sglebius