This is current implementation of api_debug_log is here:
int64_t api_debug_log(char c, struct vcpu *current)
{
struct vm *vm = current->vm;
struct vm_locked vm_locked = vm_lock(vm);
if (c == '\n' || c == '\0' ||
vm->log_buffer_length == sizeof(vm->log_buffer)) {
dlog_flush_vm_buffer(vm->id, vm->log_buffer,
vm->log_buffer_length);
vm->log_buffer_length = 0;
} else {
vm->log_buffer[vm->log_buffer_length++] = c;
}
vm_unlock(&vm_locked);
return 0;
}
I think that this code doesn't print `c` if vm->log_buffer_length == sizeof(vm->log_buffer). Is it intended?