hv:clear up the usage of printf data struct

The printf related functions have been called by other various
functions, e.g. get_ptdev_info(), get_ioapic_info, etc. The patch
is used to clear up the usage.

Tracked-On: #861
Signed-off-by: Junjun Shan <junjun.shan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Junjun Shan
2018-09-18 17:50:26 +08:00
committed by Xie, Nanlin
parent 965f8d1033
commit 5c92329606
18 changed files with 29 additions and 29 deletions

View File

@@ -62,7 +62,7 @@ int vioapic_mmio_access_handler(struct vcpu *vcpu,
struct io_request *io_req);
#ifdef HV_DEBUG
void get_vioapic_info(char *str_arg, int str_max, uint16_t vmid);
void get_vioapic_info(char *str_arg, size_t str_max, uint16_t vmid);
#endif /* HV_DEBUG */
#endif

View File

@@ -33,7 +33,7 @@ void gsi_unmask_irq(uint32_t irq);
extern uint8_t pic_ioapic_pin_map[NR_LEGACY_PIN];
#ifdef HV_DEBUG
int get_ioapic_info(char *str_arg, int str_max_len);
int get_ioapic_info(char *str_arg, size_t str_max_len);
#endif /* HV_DEBUG */
#endif /* IOAPIC_H */

View File

@@ -119,7 +119,7 @@ void interrupt_init(uint16_t pcpu_id);
void cancel_event_injection(struct vcpu *vcpu);
#ifdef HV_DEBUG
void get_cpu_interrupt_info(char *str_arg, int str_max);
void get_cpu_interrupt_info(char *str_arg, size_t str_max);
#endif /* HV_DEBUG */
extern uint32_t acrn_vhm_vector;

View File

@@ -85,7 +85,7 @@ static inline uint64_t vm_exit_io_instruction_port_number(uint64_t exit_qual)
}
#ifdef HV_DEBUG
void get_vmexit_profile(char *str_arg, int str_max);
void get_vmexit_profile(char *str_arg, size_t str_max);
#endif /* HV_DEBUG */
#endif /* VMEXIT_H_ */

View File

@@ -83,7 +83,7 @@ void ptdev_activate_entry(
void ptdev_deactivate_entry(struct ptdev_remapping_info *entry);
#ifdef HV_DEBUG
void get_ptdev_info(char *str_arg, int str_max);
void get_ptdev_info(char *str_arg, size_t str_max);
#endif /* HV_DEBUG */
uint32_t get_vm_ptdev_intr_data(const struct vm *target_vm, uint64_t *buffer,

View File

@@ -28,7 +28,7 @@ void console_init(void);
* and no character was written.
*/
int console_write(const char *s, size_t len);
size_t console_write(const char *s, size_t len);
/** Writes a single character to the console.
*
@@ -62,13 +62,13 @@ static inline void console_init(void)
{
}
static inline int console_write(__unused const char *str,
static inline size_t console_write(__unused const char *str,
__unused size_t len)
{
return 0;
}
static inline void console_putc(__unused const char *ch) { }
static inline int console_getc(void) { return 0; }
static inline char console_getc(void) { return '\0'; }
static inline void console_setup_timer(void) {}
static inline void suspend_console(void) {}
static inline void resume_console(void) {}