cl_log(LOG_INFO, "Stat of %s (code: %d).", newname, s_res);
moveFile(const char *oldname,	 const char *newname,	 gboolean backup,	 char *ext){	/* move 'oldname' to 'newname' by creating a hard link to it	 *  and then removing the original hard link	 */	int res = 0;	struct stat tmp;	int s_res = stat(newname, &tmp);	FNIN();		cl_log(LOG_INFO, "Stat of %s (code: %d).", newname, s_res);	if (s_res >= 0)	{		if (backup == TRUE) {			char backname[1024];			static const char *back_ext = "bak";			if (ext != NULL) back_ext = (char*)ext;	    			snprintf(backname, sizeof(backname)-1,				 "%s.%s", newname, back_ext);			moveFile(newname, backname, FALSE, NULL);		} else {			res = unlink(newname);			if (res < 0) {				perror("Could not remove the current backup of Cib");				FNRET(-1);			}		}	}    	s_res = stat(oldname, &tmp);	cl_log(LOG_INFO, "Stat of %s (code: %d).", oldname, s_res);	if (s_res >= 0) {		res = link(oldname, newname);		if (res < 0) {			perror("Could not create backup of current Cib");			FNRET(-2);		}		res = unlink(oldname);		if (res < 0) {			perror("Could not unlink the current Cib");			FNRET(-3);		}	}    	FNRET(0);    }