9 int pathLen = strlen(pathName);
16 if(!pathName || !*pathName || (!returnedPath && !fullPathName))
22 memset(tempPath, 0,
sizeof(tempPath));
23 memset(linkpath, 0,
sizeof(linkpath));
25 for(i = 0; i < pathLen; i++)
27 tempPath[i] = pathName[i];
29 if(pathName[i] ==
'/' || i == (pathLen - 1))
32 if(pathName[i] ==
'/') {tempPath[i] = 0;}
34 ret = readlink(tempPath, linkpath,
sizeof(linkpath));
37 if(returnedPath) strcpy(returnedPath, linkpath);
41 strcpy(fullPathName, linkpath);
42 if(pathName[i] ==
'/') strcat(fullPathName, &pathName[i]);
50 tempPath[i] = pathName[i];
int HDD_FindSymbolicLink(const char *pathName, char *returnedPath, char *fullPathName)