ENOENT and EEXIST when using symlink() are expected and handled by
upgrade-apply-deltafs.
Change-Id: I154557186d3a7664c1f23777f5d0406f5cf37bf6
ret = symlink(refpath, sympath);
if (ret != 0) {
- LOGE(" symlink failed with return value: %d, errno: %d\n", ret, errno);
-
if (errno == EEXIST) {
ret = lstat(sympath, &sbuf);
LOGL(LOG_SSENGINE, "symlink LSTAT with return value: %d\n", ret);
} else if (errno == ENOENT) {//to handle cases where new symlink points to a new symlink yet to be created
return errno;
} else {
+ LOGE("symlink() failed with return value: %d, errno: %d\n", ret, errno);
return E_SS_FAILURE;
}
}