qemu-e2k/hw/net/rocker/qmp-norocker.c
Markus Armbruster 1178710247 rocker: Tweak stubbed out monitor commands' error messages
The QERR_ macros are leftovers from the days of "rich" error objects.
We've been trying to reduce their remaining use.

The stubbed out Rocker monitor commands are the last remaining users
of QERR_FEATURE_DISABLED.  They fail like this:

    (qemu) info rocker mumble
    Error: The feature 'rocker' is not enabled

The real rocker commands fail like this when the named object doesn't
exist:

    Error: rocker mumble not found

If that's good enough when Rocker is enabled, then it's good enough
when it's disabled, so replace QERR_FEATURE_DISABLED with that, and
drop the macro.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20230207075115.1525-13-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Juan Quintela <quintela@redhat.com>
2023-02-23 14:10:17 +01:00

50 lines
1.6 KiB
C

/*
* QMP command stubs
*
* Copyright (c) 2015 David Ahern <dsahern@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-rocker.h"
RockerSwitch *qmp_query_rocker(const char *name, Error **errp)
{
error_setg(errp, "rocker %s not found", name);
return NULL;
};
RockerPortList *qmp_query_rocker_ports(const char *name, Error **errp)
{
error_setg(errp, "rocker %s not found", name);
return NULL;
};
RockerOfDpaFlowList *qmp_query_rocker_of_dpa_flows(const char *name,
bool has_tbl_id,
uint32_t tbl_id,
Error **errp)
{
error_setg(errp, "rocker %s not found", name);
return NULL;
};
RockerOfDpaGroupList *qmp_query_rocker_of_dpa_groups(const char *name,
bool has_type,
uint8_t type,
Error **errp)
{
error_setg(errp, "rocker %s not found", name);
return NULL;
};