#define QERR_DEVICE_HAS_NO_MEDIUM \
"Device '%s' has no medium"
-#define QERR_DEVICE_INIT_FAILED \
- "Device '%s' could not be initialized"
-
#define QERR_DEVICE_IN_USE \
"Device '%s' is in use"
#define QERR_DEVICE_NO_HOTPLUG \
"Device '%s' does not support hotplugging"
-#define QERR_FD_NOT_FOUND \
- "File descriptor named '%s' not found"
-
-#define QERR_FD_NOT_SUPPLIED \
- "No file descriptor supplied via SCM_RIGHTS"
-
#define QERR_FEATURE_DISABLED \
"The feature '%s' is not enabled"
fd = qemu_chr_fe_get_msgfd(&cur_mon->chr);
if (fd == -1) {
- error_setg(errp, QERR_FD_NOT_SUPPLIED);
+ error_setg(errp, "No file descriptor supplied via SCM_RIGHTS");
return;
}
}
qemu_mutex_unlock(&cur_mon->mon_lock);
- error_setg(errp, QERR_FD_NOT_FOUND, fdname);
+ error_setg(errp, "File descriptor named '%s' not found", fdname);
}
int monitor_get_fd(Monitor *mon, const char *fdname, Error **errp)
fd = qemu_chr_fe_get_msgfd(&mon->chr);
if (fd == -1) {
- error_setg(errp, QERR_FD_NOT_SUPPLIED);
+ error_setg(errp, "No file descriptor supplied via SCM_RIGHTS");
goto error;
}
} else {
snprintf(fd_str, sizeof(fd_str), "fdset-id:%" PRId64, fdset_id);
}
- error_setg(errp, QERR_FD_NOT_FOUND, fd_str);
+ error_setg(errp, "File descriptor named '%s' not found", fd_str);
}
FdsetInfoList *qmp_query_fdsets(Error **errp)
if (net_client_init_fun[netdev->type](netdev, netdev->id, peer, errp) < 0) {
/* FIXME drop when all init functions store an Error */
if (errp && !*errp) {
- error_setg(errp, QERR_DEVICE_INIT_FAILED,
+ error_setg(errp, "Device '%s' could not be initialized",
NetClientDriver_str(netdev->type));
}
return -1;