mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 18:14:53 +00:00
tools: acrntrace: save trace data file under current dir by default
Current implementation save trace data files on tmpfs by default, acrntrace would use up all the physical mem, which can affect system functioning. This commit changes default location for trace data file to current dir, and removes the codes for space reservation, which is not necessary. Signed-off-by: Yan, Like <like.yan@intel.com> Reviewed-by: Eddie Dong <eddie.dong@intel.com> Reviewed-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include "sbuf.h"
|
||||
#include <errno.h>
|
||||
|
||||
static inline bool sbuf_is_empty(shared_buf_t *sbuf)
|
||||
{
|
||||
@@ -59,9 +60,9 @@ int sbuf_write(int fd, shared_buf_t *sbuf)
|
||||
|
||||
start = (void *)sbuf + SBUF_HEAD_SIZE + sbuf->head;
|
||||
written = write(fd, start, sbuf->ele_size);
|
||||
if ( written != sbuf->ele_size) {
|
||||
printf("Failed to write. Expect written size %d, returned %d\n",
|
||||
sbuf->ele_size, written);
|
||||
if (written != sbuf->ele_size) {
|
||||
printf("Failed to write: ret %d (ele_size %d), errno %d\n",
|
||||
written, sbuf->ele_size, (written == -1) ? errno : 0);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user