0001
0002
0003
0004 #ifndef __VBOX_UTILS_H__
0005 #define __VBOX_UTILS_H__
0006
0007 #include <linux/printk.h>
0008 #include <linux/vbox_vmmdev_types.h>
0009
0010 struct vbg_dev;
0011
0012
0013
0014
0015
0016 __printf(1, 2) void vbg_info(const char *fmt, ...);
0017 __printf(1, 2) void vbg_warn(const char *fmt, ...);
0018 __printf(1, 2) void vbg_err(const char *fmt, ...);
0019 __printf(1, 2) void vbg_err_ratelimited(const char *fmt, ...);
0020
0021
0022 #if defined(DEBUG) && !defined(CONFIG_DYNAMIC_DEBUG)
0023 __printf(1, 2) void vbg_debug(const char *fmt, ...);
0024 #else
0025 #define vbg_debug pr_debug
0026 #endif
0027
0028 int vbg_hgcm_connect(struct vbg_dev *gdev, u32 requestor,
0029 struct vmmdev_hgcm_service_location *loc,
0030 u32 *client_id, int *vbox_status);
0031
0032 int vbg_hgcm_disconnect(struct vbg_dev *gdev, u32 requestor,
0033 u32 client_id, int *vbox_status);
0034
0035 int vbg_hgcm_call(struct vbg_dev *gdev, u32 requestor, u32 client_id,
0036 u32 function, u32 timeout_ms,
0037 struct vmmdev_hgcm_function_parameter *parms, u32 parm_count,
0038 int *vbox_status);
0039
0040
0041
0042
0043
0044
0045 int vbg_status_code_to_errno(int rc);
0046
0047
0048
0049
0050
0051 struct vbg_dev *vbg_get_gdev(void);
0052
0053
0054
0055
0056
0057 void vbg_put_gdev(struct vbg_dev *gdev);
0058
0059 #endif