upgrade-apply-deltafs: Fix misleading debug message 46/286246/1
authorAntoni Adaszkiewicz <a.adaszkiewi@samsung.com>
Mon, 2 Jan 2023 16:08:40 +0000 (17:08 +0100)
committerAntoni Adaszkiewicz <a.adaszkiewi@samsung.com>
Mon, 2 Jan 2023 16:08:40 +0000 (17:08 +0100)
ENOENT and EEXIST when using symlink() are expected and handled by
upgrade-apply-deltafs.

Change-Id: I154557186d3a7664c1f23777f5d0406f5cf37bf6

src/upgrade-apply-deltafs/engine/SS_FSUpdate.c

index 01e0d50..5b0d2b1 100755 (executable)
@@ -571,8 +571,6 @@ SS_Link(void *pbUserData, char *pLinkName, char *pReferenceFileName)
 
        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);
@@ -592,6 +590,7 @@ SS_Link(void *pbUserData, char *pLinkName, char *pReferenceFileName)
                } 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;
                }
        }