XilinxProcessorIPLib/drivers/aiengine/src/lib/xaielib.c
u32 XAieLib_OpenLogFile(const char *File)
{
#ifdef __linux__
	if (XAieLib_LogFPtr != XAIE_NULL) {
		return XAIELIB_FAILURE;
	}
	if (File == XAIE_NULL) {
		return XAIELIB_FAILURE;
	}
	XAieLib_LogFPtr = fopen(File, "a");
	if (XAieLib_LogFPtr == XAIE_NULL) {
		XAieLib_IntPrint("Failed to open log file %s, %s.\n",
				 File, strerror(errno));
		return XAIE_FAILURE;
	}
	return XAIELIB_SUCCESS;
#else
	(void)File;
	return XAIELIB_FAILURE;
#endif
}
/*****************************************************************************/
/**
*
* This API set the log file
*
* @param	File - path of the file for logging.
*
* @return	XAIE_SUCCESS for success or XAIE_FAILURE for failure.
*
* @note		If will be fail if the file is failed to open, or if there is
*		already logging file opened.
*
*******************************************************************************/
This API set the log file
This API set the log file
u32 XAieLib_OpenLogFile(const char *File)
{
#ifdef __linux__
	if (XAieLib_LogFPtr != XAIE_NULL) {
		return XAIELIB_FAILURE;
	}
	if (File == XAIE_NULL) {
		return XAIELIB_FAILURE;
	}
	XAieLib_LogFPtr = fopen(File, "a");
	if (XAieLib_LogFPtr == XAIE_NULL) {
		XAieLib_IntPrint("Failed to open log file %s, %s.\n",
				 File, strerror(errno));
		return XAIE_FAILURE;
	}
	return XAIELIB_SUCCESS;
#else
	(void)File;
	return XAIELIB_FAILURE;
#endif
}
u32 XAieLib_OpenLogFile ( const char * File ) { #ifdef __linux__ if ( XAieLib_LogFPtr != XAIE_NULL ) { return XAIELIB_FAILURE ; } if ( File == XAIE_NULL ) { return XAIELIB_FAILURE ; } XAieLib_LogFPtr = fopen ( File , " " ) ; if ( XAieLib_LogFPtr == XAIE_NULL ) { XAieLib_IntPrint ( " \n " , File , strerror ( errno ) ) ; return XAIE_FAILURE ; } return XAIELIB_SUCCESS ; #else ( void ) File ; return XAIELIB_FAILURE ; #endif }
This API set the log file
This API set the log file