mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 18:14:53 +00:00
tools: acrn-manager: change path of vm conf files
The path of vm conf files changed from "/opt/acrn/conf" to "/usr/share/acrn/conf", since "/opt" is not generally used on clearlinux. Tracked-On: #2040 Signed-off-by: Yan, Like <like.yan@intel.com> Acked-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
@@ -143,7 +143,6 @@ void acrnd_vm_timer_func(struct work_arg *arg)
|
||||
}
|
||||
}
|
||||
|
||||
#define TIMER_LIST_FILE "/opt/acrn/conf/timer_list"
|
||||
static pthread_mutex_t timer_file_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
/* load/store_timer_list to file to keep timers if SOS poweroff */
|
||||
@@ -157,7 +156,7 @@ static int load_timer_list(void)
|
||||
|
||||
pthread_mutex_lock(&timer_file_mutex);
|
||||
|
||||
fp = fopen(TIMER_LIST_FILE, "r");
|
||||
fp = fopen(ACRN_CONF_TIMER_LIST, "r");
|
||||
if (!fp) {
|
||||
perror("Open timer list file");
|
||||
ret = -1;
|
||||
@@ -402,7 +401,7 @@ static int store_timer_list(void)
|
||||
int ret = 0;
|
||||
|
||||
pthread_mutex_lock(&timer_file_mutex);
|
||||
fp = fopen(TIMER_LIST_FILE, "w+");
|
||||
fp = fopen(ACRN_CONF_TIMER_LIST, "w+");
|
||||
if (!fp) {
|
||||
perror("Open timer list file");
|
||||
ret = -1;
|
||||
@@ -429,7 +428,7 @@ static int store_timer_list(void)
|
||||
if (sys_wakeup) {
|
||||
set_sos_timer(sys_wakeup);
|
||||
} else {
|
||||
unlink(TIMER_LIST_FILE);
|
||||
unlink(ACRN_CONF_TIMER_LIST);
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
@@ -584,7 +583,7 @@ void handle_acrnd_resume(struct mngr_msg *msg, int client_fd, void *param)
|
||||
|
||||
if (wakeup_reason & CBC_WK_RSN_RTC) {
|
||||
/* wakeup by RTC timer */
|
||||
if (!stat(TIMER_LIST_FILE, &st)
|
||||
if (!stat(ACRN_CONF_TIMER_LIST, &st)
|
||||
&& S_ISREG(st.st_mode)) {
|
||||
ack.data.err = load_timer_list();
|
||||
if (ack.data.err == 0) {
|
||||
@@ -602,7 +601,7 @@ void handle_acrnd_resume(struct mngr_msg *msg, int client_fd, void *param)
|
||||
}
|
||||
|
||||
reply_ack:
|
||||
unlink(TIMER_LIST_FILE);
|
||||
unlink(ACRN_CONF_TIMER_LIST);
|
||||
|
||||
if (client_fd > 0)
|
||||
mngr_send_msg(client_fd, &ack, NULL, 0);
|
||||
@@ -677,7 +676,7 @@ int main(int argc, char *argv[])
|
||||
return -1;
|
||||
}
|
||||
|
||||
unlink(TIMER_LIST_FILE);
|
||||
unlink(ACRN_CONF_TIMER_LIST);
|
||||
|
||||
atexit(handle_on_exit);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user