Sfoglia il codice sorgente

accel: Make AccelClass.available() optional

When we move accel classes outside accel.c, the available() function
won't be necessary anymore, because the classes will be registered only
if the accelerator code is really enabled at build time.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Eduardo Habkost 11 anni fa
parent
commit
f6dfb83547
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      accel.c

+ 1 - 1
accel.c

@@ -82,7 +82,7 @@ int configure_accelerator(MachineClass *mc)
             fprintf(stderr, "\"%s\" accelerator does not exist.\n", buf);
             fprintf(stderr, "\"%s\" accelerator does not exist.\n", buf);
             continue;
             continue;
         }
         }
-        if (!acc->available()) {
+        if (acc->available && !acc->available()) {
             printf("%s not supported for this target\n",
             printf("%s not supported for this target\n",
                    acc->name);
                    acc->name);
             continue;
             continue;