mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-04-18 03:31:52 +00:00
accel: make configure_accelerator return void
Return the negated value of accel_initialised is meaningless, and the caller vl doesn't check it. Backports commit bdc3f61dec2f9c227235bb5f677a0272e1184c82 from qemu
This commit is contained in:
parent
eab60b7c77
commit
7cf135457a
|
@ -71,10 +71,9 @@ static const TypeInfo tcg_accel_type = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
int configure_accelerator(MachineState *ms)
|
void configure_accelerator(MachineState *ms)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
bool accel_initialised = false;
|
|
||||||
AccelClass *acc;
|
AccelClass *acc;
|
||||||
|
|
||||||
acc = accel_find(ms->uc, "tcg");
|
acc = accel_find(ms->uc, "tcg");
|
||||||
|
@ -83,11 +82,7 @@ int configure_accelerator(MachineState *ms)
|
||||||
fprintf(stderr, "failed to initialize %s: %s\n",
|
fprintf(stderr, "failed to initialize %s: %s\n",
|
||||||
acc->name,
|
acc->name,
|
||||||
strerror(-ret));
|
strerror(-ret));
|
||||||
} else {
|
|
||||||
accel_initialised = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return !accel_initialised;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void register_accel_types(struct uc_struct *uc)
|
void register_accel_types(struct uc_struct *uc)
|
||||||
|
|
|
@ -55,7 +55,7 @@ typedef struct AccelClass {
|
||||||
#define ACCEL_GET_CLASS(uc, obj) \
|
#define ACCEL_GET_CLASS(uc, obj) \
|
||||||
OBJECT_GET_CLASS(uc, AccelClass, (obj), TYPE_ACCEL)
|
OBJECT_GET_CLASS(uc, AccelClass, (obj), TYPE_ACCEL)
|
||||||
|
|
||||||
int configure_accelerator(MachineState *ms);
|
void configure_accelerator(MachineState *ms);
|
||||||
|
|
||||||
void register_accel_types(struct uc_struct *uc);
|
void register_accel_types(struct uc_struct *uc);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue