symlink.c
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:1k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. /* -*- c -*- --------------------------------------------------------------- *
  2.  *
  3.  * linux/fs/autofs/symlink.c
  4.  *
  5.  *  Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved
  6.  *
  7.  * This file is part of the Linux kernel and is made available under
  8.  * the terms of the GNU General Public License, version 2, or at your
  9.  * option, any later version, incorporated herein by reference.
  10.  *
  11.  * ------------------------------------------------------------------------- */
  12. #include "autofs_i.h"
  13. static int autofs4_readlink(struct dentry *dentry, char *buffer, int buflen)
  14. {
  15. struct autofs_info *ino = autofs4_dentry_ino(dentry);
  16. return vfs_readlink(dentry, buffer, buflen, ino->u.symlink);
  17. }
  18. static int autofs4_follow_link(struct dentry *dentry, struct nameidata *nd)
  19. {
  20. struct autofs_info *ino = autofs4_dentry_ino(dentry);
  21. return vfs_follow_link(nd, ino->u.symlink);
  22. }
  23. struct inode_operations autofs4_symlink_inode_operations = {
  24. readlink: autofs4_readlink,
  25. follow_link: autofs4_follow_link
  26. };