intel/dev: print out error when platform is not found by name

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4594>
This commit is contained in:
Lionel Landwerlin 2020-04-16 21:45:23 +03:00
parent fd3c014672
commit 8c3c1d8a99

View file

@ -76,6 +76,12 @@ gen_device_name_to_pci_device_id(const char *name)
return name_map[i].pci_id;
}
fprintf(stderr, "Unknown platform '%s'. Supported names: %s",
name, name_map[0].name);
for (unsigned i = 1; i < ARRAY_SIZE(name_map); i++)
fprintf(stderr, ", %s", name_map[i].name);
fprintf(stderr, "\n");
return -1;
}