From 8c3c1d8a9906f3a45cbe50012b2ca60a3bc21fe8 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Thu, 16 Apr 2020 21:45:23 +0300 Subject: [PATCH] intel/dev: print out error when platform is not found by name Signed-off-by: Lionel Landwerlin Reviewed-by: Eric Anholt Acked-by: Matt Turner Part-of: --- src/intel/dev/gen_device_info.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/intel/dev/gen_device_info.c b/src/intel/dev/gen_device_info.c index 299d33f9501..742c17f64c8 100644 --- a/src/intel/dev/gen_device_info.c +++ b/src/intel/dev/gen_device_info.c @@ -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; } -- 2.30.2