readlink

Autres langues

Langue: ja

Version: 1997-08-21 (openSuse - 09/10/07)

Autres sections - même nom

Section: 2 (Appels système)

̾Á°

readlink - ¥·¥ó¥Ü¥ê¥Ã¥¯¡¦¥ê¥ó¥¯¤ÎÃͤòÆɤà

½ñ¼°

#include <unistd.h>

ssize_t readlink(const char *path, char *buf, size_t bufsiz);

ÀâÌÀ

readlink() ¤Ï path ¤ÇÍ¿¤¨¤é¤ì¤¿¥·¥ó¥Ü¥ê¥Ã¥¯¡¦¥ê¥ó¥¯¤ÎÆâÍƤò buf ¥Ð¥Ã¥Õ¥¡¡¼¤Ø³ÊǼ¤¹¤ë¡¢ buf ¤Î¥µ¥¤¥º¤Ï bufsiz ¤Ç¤¢¤ë¡£ readlink() ¤Ï NULL ¥Ð¥¤¥È¤ò buf ¤ËÄɲ䷤ʤ¤¡£ ¤½¤ÎÆâÍÆÁ´¤Æ¤ò³ÊǼ¤¹¤ë¤Î¤Ë¥Ð¥Ã¥Õ¥¡¡¼¤¬¾®¤µ²á¤®¤ë¾ì¹ç¤Ï¡¢ (bufsiz ¥Ð¥¤¥È¤ÎŤµ¤Ë) ÆâÍƤòÀÚ¤êµÍ¤á¤ë¡£

ÊÖ¤êÃÍ

À®¸ù¤·¤¿¾ì¹ç¤Ë¤Ï¥Ð¥Ã¥Õ¥¡¡¼¤Ë³ÊǼ¤µ¤ì¤¿Ê¸»ú¿ô¤òÊÖ¤¹¡£ ¥¨¥é¡¼¤¬µ¯¤³¤Ã¤¿¾ì¹ç¤Ë¤Ï -1 ¤òÊÖ¤·¡¢ errno ¤Ë¥¨¥é¡¼¡¦¥³¡¼¥É¤ò³ÊǼ¤¹¤ë¡£

¥¨¥é¡¼

EACCES
¥Ñ¥¹¤Î¥Ç¥£¥ì¥¯¥È¥êÉôʬ¤Ë¸¡º÷µö²Ä¤¬Í¿¤¨¤é¤ì¤Æ¤¤¤Ê¤¤ (path_resolution(7) ¤â»²¾È¤¹¤ë¤³¤È)¡£
EFAULT
buf ¤¬¥×¥í¥»¥¹¤Ë³ä¤êÅö¤Æ¤é¤ì¤¿¥¢¥É¥ì¥¹¶õ´Ö¤Î³°¤ò»Ø¤·¤Æ¤¤¤ë¡£
EINVAL
bufsiz ¤¬Àµ¤Ç¤Ê¤¤¡£
EINVAL
»ØÄꤷ¤¿¥Õ¥¡¥¤¥ë¤¬¥·¥ó¥Ü¥ê¥Ã¥¯¡¦¥ê¥ó¥¯¤Ç¤Ê¤¤¡£
EIO
¥Õ¥¡¥¤¥ë¡¦¥·¥¹¥Æ¥à¤ÎÆɤ߹þ¤ßÃæ¤Ë I/O ¥¨¥é¡¼¤¬µ¯¤³¤Ã¤¿¡£
ELOOP
¥Ñ¥¹Ì¾¤Ë¥·¥ó¥Ü¥ê¥Ã¥¯¡¦¥ê¥ó¥¯¤¬Â¿¤¹¤®¤ë¡£
ENAMETOOLONG
¥Ñ¥¹Ì¾¤«¥Ñ¥¹Ì¾¤Î°ìÉôʬ¤¬Ä¹²á¤®¤ë¡£
ENOENT
¤½¤Î̾Á°¤Î¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤·¤Ê¤¤¡£
ENOMEM
¥«¡¼¥Í¥ë¤Ë½½Ê¬¤Ê¥á¥â¥ê¤¬¤Ê¤¤¡£
ENOTDIR
¥Ñ¥¹¤Î¥Ç¥£¥ì¥¯¥È¥êÉôʬ¤¬¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤Ê¤¤¡£

½àµò

4.4BSD (readlink() ´Ø¿ô¥³¡¼¥ë¤Ï 4.2BSD ¤Ç¸½¤ï¤ì¤¿), POSIX.1-2001.

Ãí°Õ

¥Ð¡¼¥¸¥ç¥ó 2.4 °ÊÁ°¤Î glibc (¥Ð¡¼¥¸¥ç¥ó 2.4 ¤ò´Þ¤à) ¤Ç¤Ï¡¢ readlink() ¤ÎÊÖ¤êÃͤη¿¤Ï int ¤ÇÀë¸À¤µ¤ì¤Æ¤¤¤¿¡£¸½ºß¤Ç¤Ï¡¢ÊÖ¤êÃͤη¿¤Ï ssize_t ¤Ç¤¢¤ë (ÊÖ¤êÃÍ ssize_t ¤Ï POSIX.1-2001 ¤Ç (¿·¤¿¤Ë) ɬ¿Ü¤È¤Ê¤Ã¤¿)¡£

´ØÏ¢¹àÌÜ

lstat(2), readlinkat(2), stat(2), symlink(2), path_resolution(7)