.\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" @(#) readlink. 2 8.1 (Berkeley) 6/4/93 .\" %FreeBSD: src/lib/libc/sys/readlink. 2, v 1.7. 2.4 2001/12/14 18:34:01 ru Exp % .\" .\" $FreeBSD: doc/ja_JP.eucJP/man/man2/readlink. 2, v 1.7 2001/12/23 00:03:42 horikawa Exp $ .Dd June 4, 1993 .Dt READLINK 2 .Os .Sh ¸íĪ .Nm readlink .Nd ±âÈ£ ¿¬°áÀÇ °ªÀ» µ¶ÇØ .Sh ÇÁ·Î±×·¥ ¶óÀ̺귯¸® .Lb libc .Sh ¼­½Ä .In unistd.h .Ft int .Fn readlink "const char *path" "char *buf" "int bufsiz" .Sh ÇØ¼³ .Fn readlink (Àº)´Â, .Fa bufsiz »çÀÌÁîÀÎ ¹öÆÛ .Fa buf ¾È¿¡ ±âÈ£ ¿¬°á .Fa path ÀÇ ³»¿ëÀ» ¹èÄ¡ÇÕ´Ï´Ù. .Fn readlink ÇÔ¼ö´Â .Fa buf ÀÇ ¸»¹Ì¿¡ .Dv NUL ij¸¯Å͸¦ Ãß°¡ÇÏÁö ¾Ê½À´Ï´Ù. .Sh ¹Ýȯ°ª È£ÃâÀÌ Á¤»óÀûÀ¸·Î ¿Ï·áÇßÀ» °æ¿ì, ¹öÆÛ³»¿¡ ¹èÄ¡ÇÑ Ä³¸¯Åͼö¸¦ µ¹·ÁÁÝ´Ï´Ù. ¿¡·¯°¡ ÀϾÀ» °æ¿ì´Â -1 À» µ¹·ÁÁÖ¾î, ¿¡·¯ Äڵ尡 ±Û·Î¹ú º¯¼ö .Va errno (À¸)·Î ¼³Á¤µË´Ï´Ù. .Sh ¿¡·¯ .Fn readlink (Àº)´Â ´ÙÀ½ÀÇ °æ¿ì¿¡ ½ÇÆÐÇÕ´Ï´Ù. .Bl -tag -width Er .It Bq Er ENOTDIR ÆÐ½ºÀÇ ¿ø°¡¿ä¼ÒÁß¿¡ µð·ºÅ丮 ÀÌ¿ÜÀÇ °ÍÀÌ Æ÷ÇԵǾî ÀÖ½À´Ï´Ù. .It Bq Er ENAMETOOLONG ÆÐ½º¸íÀÇ ¿ø°¡¿ä¼Ò°¡ 255 ij¸¯Å͸¦ ³Ñ°í ÀÖ´ÂÁö, ¶Ç´Â ÆÐ½º¸í Àüü°¡ 1023 ij¸¯Å͸¦ ³Ñ°í ÀÖ½À´Ï´Ù. .It Bq Er ENOENT ÁöÁ¤µÈ ÆÄÀÏÀÌ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù. .It Bq Er EACCES ÁöÁ¤µÈ ÆÐ½º¿¡´Â, °Ë»öÀÌ Çã°¡µÇ¾î ÀÖÁö ¾ÊÀº µð·ºÅ丮°¡ Æ÷ÇԵǾî ÀÖ½À´Ï´Ù. .It Bq Er ELOOP ÆÐ½º¸íÀ» º¯È¯ÇÒ °æ¿ì¿¡ °ËÃâµÈ ±âÈ£ ¿¬°áÀÌ ³Ê¹« ¸¹½À´Ï´Ù. .It Bq Er EINVAL ÁöÁ¤ÀÇ ÆÄÀÏÀÌ ±âÈ£ ¿¬°áÀÌ ¾Æ´Õ´Ï´Ù. .It Bq Er EIO ÆÄÀÏ ½Ã½ºÅÛÀ¸·ÎºÎÅÍ µ¶Çذ£¿¡ ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇß½À´Ï´Ù. .It Bq Er EFAULT .Fa buf (Àº)´Â, ÇÁ·Î¼¼½º¿¡ ÇÒ´çÇÒ ¼ö ÀÖ¾ú´ø address °ø°£ÀÇ ¹üÀ§¿Ü¸¦ °¡¸®Å°°í ÀÖ½À´Ï´Ù. .El .Sh °ü·Ã Ç׸ñ .Xr lstat 2 , .Xr stat 2 , .Xr symlink 2 , .Xr symlink 7 .Sh ¿ª»ç .Fn readlink ÇÔ¼ö´Â .Bx 4.2 ±×¸®°í µîÀåÇß½À´Ï´Ù.