~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_symlink.c

Removed DBUG symbols

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
#else
41
41
  int result=0;
42
42
  int length;
 
43
  DBUG_ENTER("my_readlink");
43
44
 
44
45
  if ((length=readlink(filename, to, FN_REFLEN-1)) < 0)
45
46
  {
58
59
  }
59
60
  else
60
61
    to[length]=0;
61
 
  return(result);
 
62
  DBUG_PRINT("exit" ,("result: %d", result));
 
63
  DBUG_RETURN(result);
62
64
#endif /* HAVE_READLINK */
63
65
}
64
66
 
71
73
  return 0;
72
74
#else
73
75
  int result;
 
76
  DBUG_ENTER("my_symlink");
 
77
  DBUG_PRINT("enter",("content: %s  linkname: %s", content, linkname));
74
78
 
75
79
  result= 0;
76
80
  if (symlink(content, linkname))
82
86
  }
83
87
  else if ((MyFlags & MY_SYNC_DIR) && my_sync_dir_by_file(linkname, MyFlags))
84
88
    result= -1;
85
 
  return(result);
 
89
  DBUG_RETURN(result);
86
90
#endif /* HAVE_READLINK */
87
91
}
88
92
 
111
115
  int result=0;
112
116
  char buff[BUFF_LEN];
113
117
  struct stat stat_buff;
 
118
  DBUG_ENTER("my_realpath");
114
119
 
115
120
  if (!(MyFlags & MY_RESOLVE_LINK) ||
116
121
      (!lstat(filename,&stat_buff) && S_ISLNK(stat_buff.st_mode)))
117
122
  {
118
123
    char *ptr;
 
124
    DBUG_PRINT("info",("executing realpath"));
119
125
    if ((ptr=realpath(filename,buff)))
120
126
    {
121
127
      strmake(to,ptr,FN_REFLEN-1);
127
133
        original name but will at least be able to resolve paths that starts
128
134
        with '.'.
129
135
      */
 
136
      DBUG_PRINT("error",("realpath failed with errno: %d", errno));
130
137
      my_errno=errno;
131
138
      if (MyFlags & MY_WME)
132
139
        my_error(EE_REALPATH, MYF(0), filename, my_errno);
134
141
      result= -1;
135
142
    }
136
143
  }
137
 
  return(result);
 
144
  DBUG_RETURN(result);
138
145
#else
139
146
  my_load_path(to, filename, NullS);
140
147
  return 0;