HV:Acrn-hypvervisor Root Directory Clean-up and create misc/ folder for Acrn daemons, services and tools.

This patch is to clean-up acrn-hypervisor root directory, targt only 5 folders under acrn-hypervisor:1.hypervisor,2.devicemodel,3.misc,4.doc,5.build

Tracked-On: #3482
Signed-off-by: Terry Zou <terry.zou@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Terry Zou
2019-07-29 12:21:54 +08:00
committed by Xie, Nanlin
parent 555a03db99
commit a9c38a5cfb
119 changed files with 62 additions and 57 deletions

View File

@@ -0,0 +1,42 @@
/*
* Copyright (C) <2018> Intel Corporation
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include "log_sys.h"
void debug_log(const int level, const char *func, const int line, ...)
{
va_list args;
char *fmt;
char *head;
char *msg;
if (level > LOG_LEVEL)
return;
va_start(args, line);
fmt = va_arg(args, char *);
if (!fmt) {
va_end(args);
return;
}
if (vasprintf(&msg, fmt, args) == -1) {
va_end(args);
return;
}
va_end(args);
if (asprintf(&head, "<%-20s%5d>: ", func, line) == -1) {
free(msg);
return;
}
sd_journal_print(level, "%s%s", head, msg);
free(msg);
free(head);
}