mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-11 03:24:58 -06:00
failover: fix indentantion
Once there, remove not needed cast. Signed-off-by: Juan Quintela <quintela@redhat.com> Message-Id: <20201118083748.1328-3-quintela@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
fe1127da11
commit
1c775d65d4
2 changed files with 17 additions and 20 deletions
|
@ -824,7 +824,6 @@ static int is_my_primary(void *opaque, QemuOpts *opts, Error **errp)
|
||||||
{
|
{
|
||||||
VirtIONet *n = opaque;
|
VirtIONet *n = opaque;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
const char *standby_id = qemu_opt_get(opts, "failover_pair_id");
|
const char *standby_id = qemu_opt_get(opts, "failover_pair_id");
|
||||||
|
|
||||||
if (standby_id != NULL && (g_strcmp0(standby_id, n->netclient_name) == 0)) {
|
if (standby_id != NULL && (g_strcmp0(standby_id, n->netclient_name) == 0)) {
|
||||||
|
@ -857,8 +856,6 @@ static DeviceState *virtio_net_find_primary(VirtIONet *n, Error **errp)
|
||||||
return dev;
|
return dev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static DeviceState *virtio_connect_failover_devices(VirtIONet *n,
|
static DeviceState *virtio_connect_failover_devices(VirtIONet *n,
|
||||||
DeviceState *dev,
|
DeviceState *dev,
|
||||||
Error **errp)
|
Error **errp)
|
||||||
|
@ -3126,9 +3123,9 @@ static bool failover_replug_primary(VirtIONet *n, Error **errp)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!n->primary_device_opts) {
|
if (!n->primary_device_opts) {
|
||||||
n->primary_device_opts = qemu_opts_from_qdict(
|
n->primary_device_opts = qemu_opts_from_qdict(qemu_find_opts("device"),
|
||||||
qemu_find_opts("device"),
|
n->primary_device_dict,
|
||||||
n->primary_device_dict, errp);
|
errp);
|
||||||
if (!n->primary_device_opts) {
|
if (!n->primary_device_opts) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -576,7 +576,7 @@ static int is_failover_device(void *opaque, const char *name, const char *value,
|
||||||
Error **errp)
|
Error **errp)
|
||||||
{
|
{
|
||||||
if (strcmp(name, "failover_pair_id") == 0) {
|
if (strcmp(name, "failover_pair_id") == 0) {
|
||||||
QemuOpts *opts = (QemuOpts *)opaque;
|
QemuOpts *opts = opaque;
|
||||||
|
|
||||||
if (qdev_should_hide_device(opts)) {
|
if (qdev_should_hide_device(opts)) {
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue