1.添加本地生成证书接口
[DEL]
1.删除获取本地信息文件
This commit is contained in:
fengweihao
2018-06-27 10:58:23 +08:00
parent 8cfaa483e1
commit a45c39aa78
10 changed files with 243 additions and 134 deletions

View File

@@ -12,15 +12,32 @@
#include <sys/types.h>
#include <unistd.h>
#include <pwd.h>
#include <dirent.h>
#include <ctype.h>
#include "rt_common.h"
#include "rt_time.h"
#include "rt_util.h"
#include "rt_string.h"
#include "logging.h"
#include "MESA_prof_load.h"
#include "MESA_handle_logger.h"
void rt_get_pname_by_pid(pid_t pid, char *task_name)
{
#define BUF_SIZE 1024
char proc_pid_path[BUF_SIZE];
char buf[BUF_SIZE];
sprintf(proc_pid_path, "/proc/%d/status", pid);
FILE* fp = fopen(proc_pid_path, "r");
if(NULL != fp){
if( fgets(buf, BUF_SIZE-1, fp)== NULL ){
fclose(fp);
}
fclose(fp);
sscanf(buf, "%*s %s", task_name);
}
}
void mesa_logging_print(int log_level, char *module, char *msg)
{
MESA_handle_runtime_log(logging_sc_lid.run_log_handle, log_level, module, msg);