}
}
+#ifdef CONFIG_MARU
+extern int start_simple_client(char* msg);
+extern char* maru_convert_path(char* msg, const char *path);
+#endif
+
static bool check_throttle_config(ThrottleConfig *cfg, Error **errp)
{
if (throttle_conflicting(cfg)) {
ret = bdrv_open(dinfo->bdrv, file, bs_opts, bdrv_flags, drv, &error);
if (ret < 0) {
+#ifdef CONFIG_MARU
+ const char _msg[] = "Failed to load disk file from the following path. Check if the file is corrupted or missing.\n\n";
+ char* err_msg = NULL;
+ err_msg = maru_convert_path((char*)_msg, file);
+ start_simple_client(err_msg);
+ if (err_msg) {
+ g_free(err_msg);
+ }
+#endif
+
error_setg(errp, "could not open disk image %s: %s",
file ?: dinfo->id, error_get_pretty(error));
error_free(error);