mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 17:58:30 +00:00
dm: add checks of ioctl return value for ACRN userspace
The current code does not always check the return value of function ioctl called in ACRN userspace, and lack of error message printing to help debug. This code fixes it by checking the return value of ioctl, and adding function errormsg to return a string describing of the error code. Tracked-On: #7029 Signed-off-by: Wen Qian <qian.wen@intel.com> Signed-off-by: Li Fei <fei1.li@intel.com> Acked-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
@@ -150,4 +150,10 @@ void vm_reset_watchdog(struct vmctx *ctx);
|
||||
|
||||
int vm_ioeventfd(struct vmctx *ctx, struct acrn_ioeventfd *args);
|
||||
int vm_irqfd(struct vmctx *ctx, struct acrn_irqfd *args);
|
||||
|
||||
/*
|
||||
* Return a string describing the meaning of the `error' code.
|
||||
*/
|
||||
char* errormsg(int error);
|
||||
|
||||
#endif /* _VMMAPI_H_ */
|
||||
|
Reference in New Issue
Block a user