オープンソース・ソフトウェアの開発とダウンロード

Subversion リポジトリの参照

Diff of /trunk/1.6.x/ccs-patch/fs/realpath.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/1.5.x/ccs-patch.tmp/fs/realpath.c revision 746 by kumaneko, Mon Dec 3 05:01:19 2007 UTC trunk/1.6.x/ccs-patch/fs/realpath.c revision 990 by kumaneko, Sat Feb 16 07:51:34 2008 UTC
# Line 3  Line 3 
3   *   *
4   * Get the canonicalized absolute pathnames. The basis for SAKURA and TOMOYO.   * Get the canonicalized absolute pathnames. The basis for SAKURA and TOMOYO.
5   *   *
6   * Copyright (C) 2005-2007  NTT DATA CORPORATION   * Copyright (C) 2005-2008  NTT DATA CORPORATION
7   *   *
8   * Version: 1.5.3-pre   2007/12/03   * Version: 1.6.0-pre   2008/02/16
9   *   *
10   * This file is applicable to both 2.4.30 and 2.6.11 and later.   * This file is applicable to both 2.4.30 and 2.6.11 and later.
11   * See README.ccs for ChangeLog.   * See README.ccs for ChangeLog.
# Line 193  char *realpath(const char *pathname) Line 193  char *realpath(const char *pathname)
193  {  {
194          struct nameidata nd;          struct nameidata nd;
195          if (pathname && path_lookup(pathname, lookup_flags, &nd) == 0) {          if (pathname && path_lookup(pathname, lookup_flags, &nd) == 0) {
196    #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,25)
197                    char *buf = realpath_from_dentry(nd.path.dentry, nd.path.mnt);
198                    path_put(&nd.path);
199    #else
200                  char *buf = realpath_from_dentry(nd.dentry, nd.mnt);                  char *buf = realpath_from_dentry(nd.dentry, nd.mnt);
201                  path_release(&nd);                  path_release(&nd);
202    #endif
203                  return buf;                  return buf;
204          }          }
205          return NULL;          return NULL;
# Line 204  char *realpath_nofollow(const char *path Line 209  char *realpath_nofollow(const char *path
209  {  {
210          struct nameidata nd;          struct nameidata nd;
211          if (pathname && path_lookup(pathname, lookup_flags ^ LOOKUP_FOLLOW, &nd) == 0) {          if (pathname && path_lookup(pathname, lookup_flags ^ LOOKUP_FOLLOW, &nd) == 0) {
212    #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,25)
213                    char *buf = realpath_from_dentry(nd.path.dentry, nd.path.mnt);
214                    path_put(&nd.path);
215    #else
216                  char *buf = realpath_from_dentry(nd.dentry, nd.mnt);                  char *buf = realpath_from_dentry(nd.dentry, nd.mnt);
217                  path_release(&nd);                  path_release(&nd);
218    #endif
219                  return buf;                  return buf;
220          }          }
221          return NULL;          return NULL;

Legend:
Removed from v.746  
changed lines
  Added in v.990

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26