diff options
Diffstat (limited to 'qmp.c')
-rw-r--r-- | qmp.c | 34 |
1 files changed, 17 insertions, 17 deletions
@@ -132,13 +132,13 @@ void qmp_cpu_add(int64_t id, Error **errp) defined in the VNC subsystem */ VncInfo *qmp_query_vnc(Error **errp) { - error_set(errp, QERR_FEATURE_DISABLED, "vnc"); + error_setg(errp, QERR_FEATURE_DISABLED, "vnc"); return NULL; }; VncInfo2List *qmp_query_vnc_servers(Error **errp) { - error_set(errp, QERR_FEATURE_DISABLED, "vnc"); + error_setg(errp, QERR_FEATURE_DISABLED, "vnc"); return NULL; }; #endif @@ -295,7 +295,7 @@ void qmp_set_password(const char *protocol, const char *password, } else if (strcmp(connected, "keep") == 0) { /* nothing */ } else { - error_set(errp, QERR_INVALID_PARAMETER, "connected"); + error_setg(errp, QERR_INVALID_PARAMETER, "connected"); return; } } @@ -307,7 +307,7 @@ void qmp_set_password(const char *protocol, const char *password, rc = qemu_spice_set_passwd(password, fail_if_connected, disconnect_if_connected); if (rc != 0) { - error_set(errp, QERR_SET_PASSWD_FAILED); + error_setg(errp, QERR_SET_PASSWD_FAILED); } return; } @@ -315,19 +315,19 @@ void qmp_set_password(const char *protocol, const char *password, if (strcmp(protocol, "vnc") == 0) { if (fail_if_connected || disconnect_if_connected) { /* vnc supports "connected=keep" only */ - error_set(errp, QERR_INVALID_PARAMETER, "connected"); + error_setg(errp, QERR_INVALID_PARAMETER, "connected"); return; } /* Note that setting an empty password will not disable login through * this interface. */ rc = vnc_display_password(NULL, password); if (rc < 0) { - error_set(errp, QERR_SET_PASSWD_FAILED); + error_setg(errp, QERR_SET_PASSWD_FAILED); } return; } - error_set(errp, QERR_INVALID_PARAMETER, "protocol"); + error_setg(errp, QERR_INVALID_PARAMETER, "protocol"); } void qmp_expire_password(const char *protocol, const char *whenstr, @@ -352,7 +352,7 @@ void qmp_expire_password(const char *protocol, const char *whenstr, } rc = qemu_spice_set_pw_expire(when); if (rc != 0) { - error_set(errp, QERR_SET_PASSWD_FAILED); + error_setg(errp, QERR_SET_PASSWD_FAILED); } return; } @@ -360,19 +360,19 @@ void qmp_expire_password(const char *protocol, const char *whenstr, if (strcmp(protocol, "vnc") == 0) { rc = vnc_display_pw_expire(NULL, when); if (rc != 0) { - error_set(errp, QERR_SET_PASSWD_FAILED); + error_setg(errp, QERR_SET_PASSWD_FAILED); } return; } - error_set(errp, QERR_INVALID_PARAMETER, "protocol"); + error_setg(errp, QERR_INVALID_PARAMETER, "protocol"); } #ifdef CONFIG_VNC void qmp_change_vnc_password(const char *password, Error **errp) { if (vnc_display_password(NULL, password) < 0) { - error_set(errp, QERR_SET_PASSWD_FAILED); + error_setg(errp, QERR_SET_PASSWD_FAILED); } } @@ -403,7 +403,7 @@ static void qmp_change_vnc(const char *target, bool has_arg, const char *arg, { if (strcmp(target, "passwd") == 0 || strcmp(target, "password") == 0) { if (!has_arg) { - error_set(errp, QERR_MISSING_PARAMETER, "password"); + error_setg(errp, QERR_MISSING_PARAMETER, "password"); } else { qmp_change_vnc_password(arg, errp); } @@ -414,12 +414,12 @@ static void qmp_change_vnc(const char *target, bool has_arg, const char *arg, #else void qmp_change_vnc_password(const char *password, Error **errp) { - error_set(errp, QERR_FEATURE_DISABLED, "vnc"); + error_setg(errp, QERR_FEATURE_DISABLED, "vnc"); } static void qmp_change_vnc(const char *target, bool has_arg, const char *arg, Error **errp) { - error_set(errp, QERR_FEATURE_DISABLED, "vnc"); + error_setg(errp, QERR_FEATURE_DISABLED, "vnc"); } #endif /* !CONFIG_VNC */ @@ -528,8 +528,7 @@ DevicePropertyInfoList *qmp_device_list_properties(const char *typename, klass = object_class_dynamic_cast(klass, TYPE_DEVICE); if (klass == NULL) { - error_set(errp, QERR_INVALID_PARAMETER_VALUE, - "name", TYPE_DEVICE); + error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "name", TYPE_DEVICE); return NULL; } @@ -686,7 +685,8 @@ int qmp_object_add(Monitor *mon, const QDict *qdict, QObject **ret) if (props) { pdict = qobject_to_qdict(props); if (!pdict) { - error_set(&local_err, QERR_INVALID_PARAMETER_TYPE, "props", "dict"); + error_setg(&local_err, QERR_INVALID_PARAMETER_TYPE, + "props", "dict"); goto out; } } |